Author: davidxu Date: Mon Mar 17 02:10:45 2014 New Revision: 263255 URL: http://svnweb.freebsd.org/changeset/base/263255
Log: MFC r263107: To avoid missing a chance to cancel thread, call _pthread_testcancel at the beginning of _sem_timedwait. Submitted by: Eric van Gyzen < eric at vangyzen dot net > Modified: stable/9/lib/libc/gen/sem_new.c Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/gen/sem_new.c ============================================================================== --- stable/9/lib/libc/gen/sem_new.c Sun Mar 16 22:56:22 2014 (r263254) +++ stable/9/lib/libc/gen/sem_new.c Mon Mar 17 02:10:45 2014 (r263255) @@ -393,6 +393,7 @@ _sem_timedwait(sem_t * __restrict sem, return (-1); retval = 0; + _pthread_testcancel(); for (;;) { while ((val = sem->_kern._count) > 0) { if (atomic_cmpset_acq_int(&sem->_kern._count, val, val - 1)) _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"