pthread_cancellation.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 RenĂ© Kijewski <rene.kijewski@fu-berlin.de>
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
18 #ifndef SYS__POSIX__PTHREAD_CANCELLCATION__H
19 #define SYS__POSIX__PTHREAD_CANCELLCATION__H
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 #define PTHREAD_CANCEL_DISABLE 0
26 #define PTHREAD_CANCEL_ENABLE 1
27 
28 #define PTHREAD_CANCEL_DEFERRED 0
29 #define PTHREAD_CANCEL_ASYNCHRONOUS 1
30 
34 #define PTHREAD_CANCELED ((void *) -2)
35 
42 int pthread_setcancelstate(int state, int *oldstate);
43 
50 int pthread_setcanceltype(int type, int *oldtype);
51 
61 
66 void pthread_testcancel(void);
67 
68 #ifdef __cplusplus
69 }
70 #endif
71 
72 #endif /* SYS__POSIX__PTHREAD_CANCELLCATION__H */
73 
int pthread_setcanceltype(int type, int *oldtype)
Cancellation point are not supported, yet.
int pthread_setcancelstate(int state, int *oldstate)
Cancellation point are not supported, yet.
void pthread_testcancel(void)
Exit the current pthread if pthread_cancel() was called for this thread before.
int pthread_cancel(pthread_t th)
Tells a pthread that it should exit.
unsigned pthread_t
Datatype to identify a POSIX thread.