FreeBSD/lib/libthr/thread/thr_syscalls.c
/*
 * Cancellation behavior:
 *   According to manual of close(), the file descriptor is always deleted.
 *   Here, thread is only canceled after the system call, so the file
 *   descriptor is always deleted despite whether the thread is canceled
 *   or not.
 */
Cancellation behavior:
According to manual of close(), the file descriptor is always deleted.
Here, thread is only canceled after the system call, so the file
descriptor is always deleted despite whether the thread is canceled
or not.
Cancellation behavior : According to manual of close () the file descriptor is always deleted . Here thread is only canceled after the system call so the file descriptor is always deleted despite whether the thread is canceled or not .
static int
__thr_close(int fd)
{
	struct pthread *curthread;
	int ret;
	curthread = _get_curthread();
	_thr_cancel_enter2(curthread, 0);
	ret = __sys_close(fd);
	_thr_cancel_leave(curthread, 1);
	return (ret);
}
static int __thr_close ( int fd ) { struct pthread * curthread ; int ret ; curthread = _get_curthread ( ) ; _thr_cancel_enter2 ( curthread , 0 ) ; ret = __sys_close ( fd ) ; _thr_cancel_leave ( curthread , 1 ) ; return ( ret ) ; }
Cancellation behavior:
   According to manual of close(), the file descriptor is always deleted.
Cancellation behavior : According to manual of close () the file descriptor is always deleted .