1 #ifndef HOSTLIB_INTERN_H
2 #define HOSTLIB_INTERN_H
4 #include <exec/nodes.h>
5 #include <exec/semaphores.h>
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
18 struct HostInterface
*HostIFace
;
19 #ifndef USE_FORBID_LOCK
20 struct SignalSemaphore HostSem
;
24 #ifdef USE_FORBID_LOCK
25 #define HOSTLIB_LOCK() Forbid()
26 #define HOSTLIB_UNLOCK() Permit()
28 #define HOSTLIB_LOCK() ObtainSemaphore(&HostLibBase->HostSem)
29 #define HOSTLIB_UNLOCK() ReleaseSemaphore(&HostLibBase->HostSem)