diff options
Diffstat (limited to 'src/lib/libc')
-rw-r--r-- | src/lib/libc/include/cancel.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/libc/include/cancel.h b/src/lib/libc/include/cancel.h index a858b80a1c..ada417d3e1 100644 --- a/src/lib/libc/include/cancel.h +++ b/src/lib/libc/include/cancel.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: cancel.h,v 1.2 2016/05/10 05:42:31 guenther Exp $ */ | 1 | /* $OpenBSD: cancel.h,v 1.3 2017/04/20 16:07:52 visa Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2015 Philip Guenther <guenther@openbsd.org> | 3 | * Copyright (c) 2015 Philip Guenther <guenther@openbsd.org> |
4 | * | 4 | * |
@@ -26,11 +26,12 @@ __BEGIN_HIDDEN_DECLS | |||
26 | __dead void _thread_canceled(void); | 26 | __dead void _thread_canceled(void); |
27 | __END_HIDDEN_DECLS | 27 | __END_HIDDEN_DECLS |
28 | 28 | ||
29 | #ifdef __LIBC__ | 29 | #if defined(__LIBC__) && !defined(TCB_HAVE_MD_SET) |
30 | /* | 30 | /* |
31 | * Redirect macros that would use the syscall to instead use our callback | 31 | * Override TIB_GET macro to use the caching callback |
32 | */ | 32 | */ |
33 | #define __get_tcb() _thread_cb.tc_tcb() | 33 | #undef TIB_GET |
34 | #define TIB_GET() TCB_TO_TIB(_thread_cb.tc_tcb()) | ||
34 | #endif | 35 | #endif |
35 | 36 | ||
36 | #define PREP_CANCEL_POINT(tib) \ | 37 | #define PREP_CANCEL_POINT(tib) \ |