Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Jul 2004 10:57:36 +0200
From:      "Petr Holub" <hopet@ics.muni.cz>
To:        <threads@freebsd.org>
Subject:   sem_wait as cancellation point
Message-ID:  <000d01c46400$732b6d60$2603fb93@KLOBOUCEK>

next in thread | raw e-mail | index | archive | help
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@cesnet.cz               phone: +420-549493944
                                             fax: +420-541212747
                                       e-mail: hopet@ics.muni.cz





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000d01c46400$732b6d60$2603fb93>