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