Loading...
Searching...
No Matches
pthread_cancellation.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2014 René Kijewski <rene.kijewski@fu-berlin.de>
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21#define PTHREAD_CANCEL_DISABLE 0
22#define PTHREAD_CANCEL_ENABLE 1
23
24#define PTHREAD_CANCEL_DEFERRED 0
25#define PTHREAD_CANCEL_ASYNCHRONOUS 1
26
30#define PTHREAD_CANCELED ((void *) -2)
31
38int pthread_setcancelstate(int state, int *oldstate);
39
46int pthread_setcanceltype(int type, int *oldtype);
47
57
63
64#ifdef __cplusplus
65}
66#endif
67
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.