2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Add a semaphore to the public list of semaphores.
8 #include "exec_intern.h"
9 #include <exec/semaphores.h>
10 #include <proto/exec.h>
12 /*****************************************************************************
16 AROS_LH1(void, AddSemaphore
,
19 AROS_LHA(struct SignalSemaphore
*, sigSem
, A1
),
22 struct ExecBase
*, SysBase
, 100, Exec
)
25 Adds a semaphore to the system public semaphore list. Since the
26 semaphore gets initialized by this function it must be free at
27 this time. Also the ln_Name field must be set.
30 sigSem - Pointer to semaphore structure
35 Semaphores are shared between the tasks that use them and must
36 therefore lie in public (or at least shared) memory.
46 *****************************************************************************/
50 /* Initialize semaphore */
51 InitSemaphore(sigSem
);
53 /* Arbitrate for the semaphore list */
55 /* Add the semaphore */
56 Enqueue(&SysBase
->SemaphoreList
,&sigSem
->ss_Link
);