* thread.cc: Update comment listing cancellation points per POSIX.

This commit is contained in:
Corinna Vinschen 2011-04-29 18:29:26 +00:00
parent 5735d5f6f4
commit 37e680bb6b
2 changed files with 305 additions and 173 deletions

View File

@ -1,3 +1,7 @@
2011-04-29 Corinna Vinschen <corinna@vinschen.de>
* thread.cc: Update comment listing cancellation points per POSIX.
2011-04-29 Corinna Vinschen <corinna@vinschen.de> 2011-04-29 Corinna Vinschen <corinna@vinschen.de>
* advapi32.cc: Add comment. * advapi32.cc: Add comment.

View File

@ -562,27 +562,42 @@ pthread::cancel ()
ResumeThread (win32_obj_id); ResumeThread (win32_obj_id);
return 0; return 0;
/* }
TODO: insert pthread_testcancel into the required functions
the required function list is: *indicates done, X indicates not present in cygwin. /* TODO: Insert pthread_testcancel into the required functions.
Here are the lists of required and optional functions per POSIX.1-2001
and POSIX.1-2008. A start (*) indicates that the Cygwin function already
is a cancellation point (aka "calls pthread_testcancel").
Required cancellation points:
accept ()
aio_suspend () aio_suspend ()
clock_nanosleep ()
* close () * close ()
connect ()
* creat () * creat ()
fcntl () fcntl () F_SETLKW
fdatasync ()
fsync () fsync ()
getmsg () getmsg ()
getpmsg () getpmsg ()
lockf () lockf () F_LOCK
mq_receive () * mq_receive ()
mq_send () * mq_send ()
* mq_timedreceive ()
* mq_timedsend ()
msgrcv () msgrcv ()
msgsnd () msgsnd ()
msync () msync ()
nanosleep () nanosleep ()
open () open ()
openat ()
* pause () * pause ()
poll () poll ()
pread () pread ()
pselect ()
* pthread_cond_timedwait () * pthread_cond_timedwait ()
* pthread_cond_wait () * pthread_cond_wait ()
* pthread_join () * pthread_join ()
@ -592,8 +607,15 @@ putpmsg ()
pwrite () pwrite ()
read () read ()
readv () readv ()
recv ()
recvfrom ()
recvmsg ()
select () select ()
* sem_timedwait ()
* sem_wait () * sem_wait ()
send ()
sendmsg ()
sendto ()
* sigpause () * sigpause ()
* sigsuspend () * sigsuspend ()
sigtimedwait () sigtimedwait ()
@ -610,13 +632,21 @@ waitid ()
write () write ()
writev () writev ()
the optional list is: Optional cancellation points:
access ()
asctime ()
asctime_r ()
catclose () catclose ()
catgets () catgets ()
catopen () catopen ()
chmod ()
chown ()
closedir () closedir ()
closelog () closelog ()
ctermid () ctermid ()
ctime ()
ctime_r ()
dbm_close () dbm_close ()
dbm_delete () dbm_delete ()
dbm_fetch () dbm_fetch ()
@ -625,18 +655,30 @@ dbm_open ()
dbm_store () dbm_store ()
dlclose () dlclose ()
dlopen () dlopen ()
dprintf ()
endgrent () endgrent ()
endhostent ()
endnetent ()
endprotoent ()
endpwent () endpwent ()
endservent ()
endutxent () endutxent ()
faccessat ()
fchmod ()
fchmodat ()
fchown ()
fchownat ()
fclose () fclose ()
fcntl () fcntl () (any value)
fflush () fflush ()
fgetc () fgetc ()
fgetpos () fgetpos ()
fgets () fgets ()
fgetwc () fgetwc ()
fgetws () fgetws ()
fmtmsg ()
fopen () fopen ()
fpathconf ()
fprintf () fprintf ()
fputc () fputc ()
fputs () fputs ()
@ -648,35 +690,56 @@ fscanf ()
fseek () fseek ()
fseeko () fseeko ()
fsetpos () fsetpos ()
fstat ()
fstatat ()
ftell () ftell ()
ftello () ftello ()
ftw () ftw ()
futimens ()
fwprintf () fwprintf ()
fwrite () fwrite ()
fwscanf () fwscanf ()
getaddrinfo ()
getc () getc ()
getc_unlocked () getc_unlocked ()
getchar () getchar ()
getchar_unlocked () getchar_unlocked ()
getcwd () getcwd ()
getdate () getdate ()
getdelim ()
getgrent () getgrent ()
getgrgid () getgrgid ()
getgrgid_r () getgrgid_r ()
getgrnam () getgrnam ()
getgrnam_r () getgrnam_r ()
gethostbyaddr ()
gethostbyname ()
gethostent ()
gethostid ()
gethostname ()
getline ()
getlogin () getlogin ()
getlogin_r () getlogin_r ()
getnameinfo ()
getnetbyaddr ()
getnetbyname ()
getnetent ()
getopt () (if opterr is nonzero)
getprotobyname ()
getprotobynumber ()
getprotoent ()
getpwent () getpwent ()
* getpwnam () * getpwnam ()
* getpwnam_r () * getpwnam_r ()
* getpwuid () * getpwuid ()
* getpwuid_r () * getpwuid_r ()
gets () gets ()
getservbyname ()
getservbyport ()
getservent ()
getutxent () getutxent ()
getutxid () getutxid ()
getutxline () getutxline ()
getw ()
getwc () getwc ()
getwchar () getwchar ()
getwd () getwd ()
@ -684,58 +747,123 @@ glob ()
iconv_close () iconv_close ()
iconv_open () iconv_open ()
ioctl () ioctl ()
link ()
linkat ()
lio_listio ()
localtime ()
localtime_r ()
lockf ()
lseek () lseek ()
lstat ()
mkdir ()
mkdirat ()
mkdtemp ()
mkfifo ()
mkfifoat ()
mknod ()
mknodat ()
mkstemp () mkstemp ()
mktime ()
nftw () nftw ()
opendir () opendir ()
openlog () openlog ()
pathconf ()
pclose () pclose ()
perror () perror ()
popen () popen ()
posix_fadvise ()
posix_fallocate ()
posix_madvise ()
posix_openpt ()
posix_spawn ()
posix_spawnp ()
posix_trace_clear ()
posix_trace_close ()
posix_trace_create ()
posix_trace_create_withlog ()
posix_trace_eventtypelist_getnext_id ()
posix_trace_eventtypelist_rewind ()
posix_trace_flush ()
posix_trace_get_attr ()
posix_trace_get_filter ()
posix_trace_get_status ()
posix_trace_getnext_event ()
posix_trace_open ()
posix_trace_rewind ()
posix_trace_set_filter ()
posix_trace_shutdown ()
posix_trace_timedgetnext_event ()
posix_typed_mem_open ()
printf () printf ()
psiginfo ()
psignal ()
pthread_rwlock_rdlock ()
pthread_rwlock_timedrdlock ()
pthread_rwlock_timedwrlock ()
pthread_rwlock_wrlock ()
putc () putc ()
putc_unlocked () putc_unlocked ()
putchar () putchar ()
putchar_unlocked () putchar_unlocked ()
puts () puts ()
pututxline () pututxline ()
putw ()
putwc () putwc ()
putwchar () putwchar ()
readdir () readdir ()
readdir_r () readdir_r ()
readlink ()
readlinkat ()
remove () remove ()
rename () rename ()
renameat ()
rewind () rewind ()
rewinddir () rewinddir ()
scandir ()
scanf () scanf ()
seekdir () seekdir ()
semop () semop ()
setgrent () setgrent ()
sethostent ()
setnetent ()
setprotoent ()
setpwent () setpwent ()
setservent ()
setutxent () setutxent ()
sigpause ()
stat ()
strerror () strerror ()
strerror_r ()
strftime ()
symlink ()
symlinkat ()
sync ()
syslog () syslog ()
tmpfile () tmpfile ()
tmpnam () tmpnam ()
ttyname () ttyname ()
ttyname_r () ttyname_r ()
tzset ()
ungetc () ungetc ()
ungetwc () ungetwc ()
unlink () unlink ()
unlinkat ()
utime ()
utimensat ()
utimes ()
vdprintf ()
vfprintf () vfprintf ()
vfwprintf () vfwprintf ()
vprintf () vprintf ()
vwprintf () vwprintf ()
wcsftime ()
wordexp ()
wprintf () wprintf ()
wscanf () wscanf ()
Note, that for fcntl (), for any value of the cmd argument. An implementation may also mark other functions not specified in the
standard as cancellation points. In particular, an implementation is
And we must not introduce cancellation points anywhere else that's part of the posix or likely to mark any nonstandard function that may block as a
opengroup specs. cancellation point. */
*/
}
void void
pthread::testcancel () pthread::testcancel ()