aboutsummaryrefslogtreecommitdiffstats
path: root/compat/android28.h
blob: 9ace49606de6c0370bc2149a80ad9e8ff1750ffc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once
#include <pthread.h>

#if defined(__BIONIC__)
#ifndef PTHREAD_CANCEL_ENABLE
#define PTHREAD_CANCEL_ENABLE  0
#endif
#ifndef PTHREAD_CANCEL_DISABLE
#define PTHREAD_CANCEL_DISABLE 0
#endif

static inline int pthread_setcancelstate(int state, int *oldstate) {
    if (oldstate) *oldstate = state;
    return 0;
}

static inline int pthread_cancel(pthread_t t) {
    (void)t;
    return 0;
}
#endif