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 PTHREAD_CANCELLATION_H
19 #define PTHREAD_CANCELLATION_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 /* PTHREAD_CANCELLATION_H */
73 
pthread_t
unsigned pthread_t
Datatype to identify a POSIX thread.
Definition: pthread_threading.h:30
pthread_setcancelstate
int pthread_setcancelstate(int state, int *oldstate)
Cancellation point are not supported, yet.
pthread_testcancel
void pthread_testcancel(void)
Exit the current pthread if pthread_cancel() was called for this thread before.
pthread_cancel
int pthread_cancel(pthread_t th)
Tells a pthread that it should exit.
pthread_setcanceltype
int pthread_setcanceltype(int type, int *oldtype)
Cancellation point are not supported, yet.