Forward compatibility: build relative-base link libraries where needed
[AROS.git] / arch / all-hosted / hostlib / hostlib_intern.h
blobcdcb43ee56c67f95147aed289a1fde06f23a916c
1 #ifndef HOSTLIB_INTERN_H
2 #define HOSTLIB_INTERN_H
4 #include <exec/nodes.h>
5 #include <exec/semaphores.h>
7 /*
8 * Windows is a very harsh environment.
9 * It requires us to Forbid() in order to call itself.
11 #ifdef HOST_OS_mingw32
12 #define USE_FORBID_LOCK
13 #endif
15 struct HostLibBase
17 struct Node hlb_Node;
18 struct HostInterface *HostIFace;
19 #ifndef USE_FORBID_LOCK
20 struct SignalSemaphore HostSem;
21 #endif
24 #ifdef USE_FORBID_LOCK
25 #define HOSTLIB_LOCK() Forbid()
26 #define HOSTLIB_UNLOCK() Permit()
27 #else
28 #define HOSTLIB_LOCK() ObtainSemaphore(&HostLibBase->HostSem)
29 #define HOSTLIB_UNLOCK() ReleaseSemaphore(&HostLibBase->HostSem)
30 #endif
32 #endif