232
POSIX.1-2008 removes ecvt(), fcvt(), gcvt(), gethostbyname(),
233
and gethostbyaddr() from the above list
234
(because those functions are removed from the standard), and adds
235
strerror() and system().
234
.SS Cancellation Points
235
POSIX.1 specifies that certain functions must,
236
and certain other functions may, be cancellation points.
237
If a thread is cancelable, its cancelability type is deferred,
238
and a cancellation request is pending for the thread,
239
then the thread is canceled when it calls a function
240
that is a cancellation point.
242
The following functions are required to be cancellation points by
243
POSIX.1-2001 and/or POSIX.1-2008:
246
.\" Document the list of all functions that are cancellation points in glibc
270
openat() [Added in POSIX.1-2008]
275
pthread_cond_timedwait()
293
sigpause() [POSIX.1-2001 only (moves to "may" list in POSIX.1-2008)]
301
usleep() [POSIX.1-2001 only (function removed in POSIX.1-2008)]
310
The following functions may be cancellation points according to
311
POSIX.1-2001 and/or POSIX.1-2008:
321
chmod() [Added in POSIX.1-2008]
322
chown() [Added in POSIX.1-2008]
336
dprintf() [Added in POSIX.1-2008]
344
faccessat() [Added in POSIX.1-2008]
345
fchmod() [Added in POSIX.1-2008]
346
fchmodat() [Added in POSIX.1-2008]
347
fchown() [Added in POSIX.1-2008]
348
fchownat() [Added in POSIX.1-2008]
350
fcntl() (for any value of cmd argument)
372
fstatat() [Added in POSIX.1-2008]
376
futimens() [Added in POSIX.1-2008]
387
getdelim() [Added in POSIX.1-2008]
393
gethostbyaddr() [SUSv3 only (function removed in POSIX.1-2008)]
394
gethostbyname() [SUSv3 only (function removed in POSIX.1-2008)]
398
getline() [Added in POSIX.1-2008]
405
getopt() (if opterr is non-zero)
423
getwd() [SUSv3 only (function removed in POSIX.1-2008)]
429
linkat() [Added in POSIX.1-2008]
430
lio_listio() [Added in POSIX.1-2008]
433
lockf() [Added in POSIX.1-2008]
436
mkdir() [Added in POSIX.1-2008]
437
mkdirat() [Added in POSIX.1-2008]
438
mkdtemp() [Added in POSIX.1-2008]
439
mkfifo() [Added in POSIX.1-2008]
440
mkfifoat() [Added in POSIX.1-2008]
441
mknod() [Added in POSIX.1-2008]
442
mknodat() [Added in POSIX.1-2008]
461
posix_trace_create_withlog()
462
posix_trace_eventtypelist_getnext_id()
463
posix_trace_eventtypelist_rewind()
465
posix_trace_get_attr()
466
posix_trace_get_filter()
467
posix_trace_get_status()
468
posix_trace_getnext_event()
471
posix_trace_set_filter()
472
posix_trace_shutdown()
473
posix_trace_timedgetnext_event()
474
posix_typed_mem_open()
476
psiginfo() [Added in POSIX.1-2008]
477
psignal() [Added in POSIX.1-2008]
478
pthread_rwlock_rdlock()
479
pthread_rwlock_timedrdlock()
480
pthread_rwlock_timedwrlock()
481
pthread_rwlock_wrlock()
492
readlink() [Added in POSIX.1-2008]
493
readlinkat() [Added in POSIX.1-2008]
496
renameat() [Added in POSIX.1-2008]
499
scandir() [Added in POSIX.1-2008]
510
sigpause() [Added in POSIX.1-2008]
516
symlinkat() [Added in POSIX.1-2008]
527
unlinkat() [Added in POSIX.1-2008]
528
utime() [Added in POSIX.1-2008]
529
utimensat() [Added in POSIX.1-2008]
530
utimes() [Added in POSIX.1-2008]
531
vdprintf() [Added in POSIX.1-2008]
543
An implementation may also mark other functions
544
not specified in the standard as cancellation points.
545
In particular, an implementation is likely to mark
546
any non-standard function that may block as a cancellation point.
547
(This includes most functions that can touch files.)
548
.\" So, scanning "cancellation point" comments in the glibc 2.8 header
549
.\" files, it looks as though at least the following non-standard
550
.\" functions are cancellation points:
590
.\" getprotobynumber_r
605
.\" getwchar_unlocked
612
.\" pthread_timedjoin_np
618
.\" putwchar_unlocked
236
638
.SS "Compiling on Linux"
237
639
On Linux, programs that use the Pthreads API should be compiled using
238
640
.IR "cc \-pthread" .