cpp: Use #pragma once instead of #ifndef guards
[ghc.git] / libraries / base / include / HsEvent.h
1 #pragma once
2
3 #include "EventConfig.h"
4
5 #include <signal.h>
6 #include <pthread.h>
7
8 #if !defined(INLINE)
9 # if defined(_MSC_VER)
10 # define INLINE extern __inline
11 # else
12 # define INLINE inline
13 # endif
14 #endif
15
16 INLINE int __hsevent_num_signals(void)
17 {
18 #if defined(_NSIG)
19 return _NSIG;
20 #else
21 return 128; /* best guess */
22 #endif
23 }
24
25 INLINE void __hsevent_thread_self(pthread_t *tid)
26 {
27 *tid = pthread_self();
28 }
29
30 INLINE int __hsevent_kill_thread(pthread_t *tid, int sig)
31 {
32 return pthread_kill(*tid, sig);
33 }
34
35 /*
36 * Local Variables:
37 * c-file-style: "stroustrup"
38 * End:
39 */