1 #ifndef EXEC_SEMAPHORES_H
2 #define EXEC_SEMAPHORES_H
5 Copyright © 1995-2017, The AROS Development Team. All rights reserved.
8 Desc: Semaphore handling
12 #include <aros/config.h>
15 # include <exec/lists.h>
19 # include <exec/nodes.h>
23 # include <exec/ports.h>
27 # include <exec/tasks.h>
30 #if defined(__AROSEXEC_SMP__)
31 #include <aros/types/spinlock_s.h>
34 /* Signal Semaphores */
36 /* Private structure for use in ObtainSemaphore */
37 struct SemaphoreRequest
39 struct MinNode sr_Link
;
40 struct Task
*sr_Waiter
;
41 #if defined(__AROSPLATFORM_SMP__)
42 #if defined(__AROSEXEC_SMP__)
43 spinlock_t sr_SpinLock
;
50 struct SignalSemaphore
54 struct MinList ss_WaitQueue
;
55 struct SemaphoreRequest ss_MultipleLink
;
56 struct Task
*ss_Owner
;
60 /* For use in Procure()/Vacate() */
61 struct SemaphoreMessage
63 struct Message ssm_Message
;
64 struct SignalSemaphore
*ssm_Semaphore
;
67 #define SM_EXCLUSIVE (0L)
68 #define SM_SHARED (1L)
70 #endif /* EXEC_SEMAPHORES_H */