add place-holder directory for the a3000 wd533c93 scsi controller implementation.
[AROS.git] / compiler / include / exec / semaphores.h
blob6d857988aa3ce635d9b7b8a1c7e24561c577774f
1 #ifndef EXEC_SEMAPHORES_H
2 #define EXEC_SEMAPHORES_H
4 /*
5 Copyright © 1995-2017, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: Semaphore handling
9 Lang: english
12 #include <aros/config.h>
14 #ifndef EXEC_LISTS_H
15 # include <exec/lists.h>
16 #endif
18 #ifndef EXEC_NODES_H
19 # include <exec/nodes.h>
20 #endif
22 #ifndef EXEC_PORTS_H
23 # include <exec/ports.h>
24 #endif
26 #ifndef EXEC_TASKS_H
27 # include <exec/tasks.h>
28 #endif
30 #if defined(__AROSEXEC_SMP__)
31 #include <aros/types/spinlock_s.h>
32 #endif
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;
44 #else
45 spinlock_t sr_Pad;
46 #endif
47 #endif
50 struct SignalSemaphore
52 struct Node ss_Link;
53 WORD ss_NestCount;
54 struct MinList ss_WaitQueue;
55 struct SemaphoreRequest ss_MultipleLink;
56 struct Task *ss_Owner;
57 WORD ss_QueueCount;
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 */