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 
9 #pragma once
10 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 #define PTHREAD_CANCEL_DISABLE 0
25 #define PTHREAD_CANCEL_ENABLE 1
26 
27 #define PTHREAD_CANCEL_DEFERRED 0
28 #define PTHREAD_CANCEL_ASYNCHRONOUS 1
29 
33 #define PTHREAD_CANCELED ((void *) -2)
34 
41 int pthread_setcancelstate(int state, int *oldstate);
42 
49 int pthread_setcanceltype(int type, int *oldtype);
50 
60 
65 void pthread_testcancel(void);
66 
67 #ifdef __cplusplus
68 }
69 #endif
70 
int pthread_setcancelstate(int state, int *oldstate)
Cancellation point are not supported, yet.
int pthread_setcanceltype(int type, int *oldtype)
Cancellation point are not supported, yet.
int pthread_cancel(pthread_t th)
Tells a pthread that it should exit.
void pthread_testcancel(void)
Exit the current pthread if pthread_cancel() was called for this thread before.
unsigned pthread_t
Datatype to identify a POSIX thread.