Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/p/pthread_setcanceltype.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/p/pthread_setcanceltype.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/p/pthread_setcanceltype.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/p/pthread_setcanceltype.html on line 8
Set a thread's cancellation type
#include <pthread.h>
int pthread_setcanceltype( int type,
int* oldtype );
- type
- The new cancellation type.
- oldtype
- A pointer to a location where the function can store the old cancellation
type.
libc
Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.
The pthread_setcanceltype() function sets the calling
thread's cancellation type to type and returns the
previous cancellation type in oldtype.
The cancellation type can have the following values:
- PTHREAD_CANCEL_ASYNCHRONOUS
- If cancellation is enabled, new or pending cancellation requests
may be acted on immediately.
- PTHREAD_CANCEL_DEFERRED
- If cancellation is enabled, cancellation requests are held pending
until a cancellation point.
The default cancellation state for a thread is
PTHREAD_CANCEL_DEFERRED. Note that the standard POSIX and
C library calls aren't asynchronous-cancellation safe.
|
You can set this attribute (in a non-POSIX way) before creating the thread;
for more information, see
“QNX extensions,”
in the documentation for pthread_create(). |
- EOK
- Success.
- EINVAL
- Invalid cancelability type type.
POSIX 1003.1 THR
Safety: | |
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
Yes |
Thread |
Yes |
pthread_cancel(),
pthread_setcancelstate(),
pthread_testcancel()
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/p/pthread_setcanceltype.html on line 163
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/p/pthread_setcanceltype.html on line 163