4 * Copyright 2001,2004 Develer S.r.l. (http://www.develer.com/)
5 * Copyright 1999,2000,2001 Bernardo Innocenti <bernie@develer.com>
6 * This file is part of DevLib - See devlib/README for information.
9 * \brief Mutually exclusive semaphores.
10 * Shared locking not supported in this implementation.
14 * \author Bernardo Innocenti <bernie@develer.com>
19 *#* Revision 1.5 2005/04/11 19:10:28 bernie
20 *#* Include top-level headers from cfg/ subdir.
22 *#* Revision 1.4 2005/01/22 04:21:20 bernie
23 *#* Add handy typedef for struct Semaphore.
25 *#* Revision 1.3 2004/08/25 14:12:09 rasky
26 *#* Aggiornato il comment block dei log RCS
28 *#* Revision 1.2 2004/06/03 11:27:09 bernie
29 *#* Add dual-license information.
31 *#* Revision 1.1 2004/05/23 17:27:00 bernie
32 *#* Import kern/ subdirectory.
39 #include <cfg/compiler.h>
40 #include <mware/list.h>
46 typedef struct Semaphore
48 struct Process *owner;
54 * \name Process synchronization services
57 void sem_init(struct Semaphore *s);
58 bool sem_attempt(struct Semaphore *s);
59 void sem_obtain(struct Semaphore *s);
60 void sem_release(struct Semaphore *s);
63 #endif /* KERN_SEM_H */