From: Enlightenment C. <no...@cv...> - 2006-11-11 06:03:44
|
Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas Dir : e17/libs/evas/src/lib/engines/common Modified Files: evas_cpu.c Log Message: simply as PLACEHOLDER for a glitz engine. i plan on making it almost identical to the xrender engine - but xrender and glitz do not map entirely 1:1 api-wise. =================================================================== RCS file: /cvs/e/e17/libs/evas/src/lib/engines/common/evas_cpu.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -3 -r1.28 -r1.29 --- evas_cpu.c 6 Sep 2006 07:33:39 -0000 1.28 +++ evas_cpu.c 11 Nov 2006 06:03:13 -0000 1.29 @@ -207,3 +207,53 @@ { } #endif + +#ifdef BUILD_PTHREAD +EAPI void +_evas_lk_init(Lk *l) +{ + pthread_mutext_init(&(l->mutex), NULL); + l->wlk_id = 0; +// pthread_rwlock_init(&((x)->_reslock.rwl), NULL); +} + +EAPI void +_evas_lk_destroy(Lk *l) +{ + pthread_mutext_destroy(&(l->mutex), NULL); +// pthread_rwlock_destroy(&((x)->_reslock.rwl)); +} + +EAPI void +_evas_lk_read_lock(Lk *l) +{ + pthread_mutex_lock(&l->mutex); + pthread_mutex_unlock(&l->mutex); +// pthread_rwlock_rdlock(&((x)->_reslock.rwl)); +} + +EAPI void +_evas_lk_read_unlock(Lk *l) +{ + pthread_mutex_lock(&l->mutex); + pthread_mutex_unlock(&l->mutex); +// pthread_rwlock_unlock(&((x)->_reslock.rwl)); +} + +EAPI void +_evas_lk_write_lock(Lk *l) +{ + pthread_mutex_lock(&l->mutex); +// pthread_self(); +// pthread_equal(); + pthread_mutex_unlock(&l->mutex); +// pthread_rwlock_wrlock(&((x)->_reslock.rwl)); +} + +EAPI void +_evas_lk_write_unlock(Lk *l) +{ + pthread_mutex_lock(&l->mutex); + pthread_mutex_unlock(&l->mutex); +} +#endif |