[q-lang-cvs] q/modules/clib clib.c,1.87,1.88
Brought to you by:
agraef
From: Albert G. <ag...@us...> - 2008-02-22 08:23:54
|
Update of /cvsroot/q-lang/q/modules/clib In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv6967 Modified Files: clib.c Log Message: check for availability of pthread_mutex_timedlock and sem_timedwait functions Index: clib.c =================================================================== RCS file: /cvsroot/q-lang/q/modules/clib/clib.c,v retrieving revision 1.87 retrieving revision 1.88 diff -C2 -d -r1.87 -r1.88 *** clib.c 22 Feb 2008 08:12:38 -0000 1.87 --- clib.c 22 Feb 2008 08:23:49 -0000 1.88 *************** *** 5795,5798 **** --- 5795,5799 ---- int res; check_mut(mut); + #ifdef HAVE_PTHREAD_MUTEX_TIMEDLOCK if (tset) { release_lock(); *************** *** 5800,5803 **** --- 5801,5805 ---- acquire_lock(); } else + #endif res = pthread_mutex_trylock(&mut->mut); if (res) *************** *** 5810,5816 **** --- 5812,5820 ---- check_sem(sem); release_lock(); + #ifdef HAVE_SEM_TIMEDWAIT if (tset) res = sem_timedwait(sem->semp, &tspec); else + #endif res = sem_trywait(sem->semp); if (!res) { |