sem_wait as cancellation point

Petr Holub hopet at ics.muni.cz
Wed Jul 7 01:57:41 PDT 2004


Hi all,

I wonder why sem_wait is not a pthread cancellation point on
FreeBSD-5. According to Linux man page:

Cancellation points are those points in the program execution  where  a
test for pending cancellation requests is performed and cancellation is
executed if positive. The following POSIX threads functions are cancellation
points:
   pthread_join (3)
   pthread_cond_wait (3)
   pthread_cond_timedwait (3)
   pthread_testcancel (3)
   sem_wait (3)
   sigwait (3)

Currently, I'm using a workaround with sem_trywait and usleep, but
it's not as efficient as sem_wait being a cancellation point.

Thanks a lot,
Petr

PS: please keep me in Cc: as I'm not member of this list.

================================================================
                            Petr Holub
CESNET z.s.p.o.                       Supercomputing Center Brno
Zikova 4                             Institute of Compt. Science
162 00 Praha 6, CZ                            Masaryk University
Czech Republic                     Botanicka 68a, 60200 Brno, CZ
e-mail: Petr.Holub at cesnet.cz               phone: +420-549493944
                                             fax: +420-541212747
                                       e-mail: hopet at ics.muni.cz





More information about the freebsd-threads mailing list