*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> pthread_cancel (3)              
Title
Content
Arch
Section
 

PTHREAD_CANCEL(3)

Contents


NAME    [Toc]    [Back]

     pthread_cancel -- cancel execution of a thread

LIBRARY    [Toc]    [Back]

     Reentrant C Library (libc_r, -lc_r)

SYNOPSIS    [Toc]    [Back]

     #include <pthread.h>

     int
     pthread_cancel(pthread_t thread);

DESCRIPTION    [Toc]    [Back]

     The pthread_cancel() function requests that thread be canceled.  The target
 thread's cancelability state and type determines when the cancellation
 takes effect.  When the cancellation is acted on, the cancellation
     cleanup handlers for thread are called.  When the last cancellation
     cleanup handler returns, the thread-specific data destructor functions
     will be called for thread.  When the last destructor function returns,
     thread will be terminated.

     The cancellation processing in the target thread runs asynchronously with
     respect to the calling thread returning from pthread_cancel().

     A status of PTHREAD_CANCELED is made available to any threads joining
     with the target.  The symbolic constant PTHREAD_CANCELED expands to a
     constant expression of type (void *), whose value matches no pointer to
     an object in memory nor the value NULL.

RETURN VALUES    [Toc]    [Back]

     If successful,  the pthread_cancel() functions will return zero.  Otherwise
 an error number will be returned to indicate the error.

ERRORS    [Toc]    [Back]

     The pthread_cancel() function will fail if:

     [ESRCH]		No thread could be found corresponding to that specified
 by the given thread ID.

SEE ALSO    [Toc]    [Back]

      
      
     pthread_cleanup_pop(3), pthread_cleanup_push(3), pthread_exit(3),
     pthread_join(3), pthread_setcancelstate(3), pthread_setcanceltype(3),
     pthread_testcancel(3)

STANDARDS    [Toc]    [Back]

     The pthread_cancel() function conforms to ISO/IEC 9945-1:1996
     (``POSIX.1'').

AUTHORS    [Toc]    [Back]

     This man page was written by David Leonard <[email protected]> for the
     OpenBSD implementation of pthread_cancel().


FreeBSD 5.2.1		       January 17, 1999 		 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
pthread_cancel Tru64 Allows a thread to request a thread to terminate execution
aio_monitor_run_sec HP-UX frequency of AIO thread pool monitor execution (in seconds)
thread_terminate Tru64 General: Prepares to stop or stops execution of the specified kernel thread
aio_cancel IRIX cancel an asynchronous I/O request
aio_cancel HP-UX cancel an asynchronous I/O operation
lp IRIX send/cancel requests to an LP line printer
cancel HP-UX print/alter/cancel requests on an LP destination
lp HP-UX print/alter/cancel requests on an LP destination
aio_cancel FreeBSD cancel an outstanding asynchronous I/O operation (REALTIME)
lpalt HP-UX print/alter/cancel requests on an LP destination
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service