projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Break on assertion failures.
[bertos.git]
/
kern
/
sem.c
diff --git
a/kern/sem.c
b/kern/sem.c
index 65c07bd17a7661df3998a8de715b8e35754d2808..7b3b472965999f53b13ac200af5ac1260ceed101 100755
(executable)
--- a/
kern/sem.c
+++ b/
kern/sem.c
@@
-3,7
+3,7
@@
* <!--
* Copyright 2001, 2004 Develer S.r.l. (http://www.develer.com/)
* Copyright 1999, 2000, 2001 Bernardo Innocenti <bernie@develer.com>
* <!--
* Copyright 2001, 2004 Develer S.r.l. (http://www.develer.com/)
* Copyright 1999, 2000, 2001 Bernardo Innocenti <bernie@develer.com>
- * This file is part of DevLib - See
devlib/README
for information.
+ * This file is part of DevLib - See
README.devlib
for information.
* -->
*
* \brief Semaphore based synchronization services.
* -->
*
* \brief Semaphore based synchronization services.
@@
-15,6
+15,12
@@
/*#*
*#* $Log$
/*#*
*#* $Log$
+ *#* Revision 1.11 2006/02/24 01:17:05 bernie
+ *#* Update for new emulator.
+ *#*
+ *#* Revision 1.10 2005/11/04 16:20:02 bernie
+ *#* Fix reference to README.devlib in header.
+ *#*
*#* Revision 1.9 2005/04/11 19:10:28 bernie
*#* Include top-level headers from cfg/ subdir.
*#*
*#* Revision 1.9 2005/04/11 19:10:28 bernie
*#* Include top-level headers from cfg/ subdir.
*#*
@@
-44,10
+50,9
@@
*#*/
#include "sem.h"
*#*/
#include "sem.h"
-#include "proc.h"
-#include "proc_p.h"
-#include "signal.h"
-#include "hw.h"
+#include <kern/proc.h>
+#include <kern/proc_p.h>
+#include <kern/signal.h>
#include <cfg/debug.h>
INLINE void sem_verify(struct Semaphore *s)
#include <cfg/debug.h>
INLINE void sem_verify(struct Semaphore *s)
@@
-136,7
+141,7
@@
void sem_obtain(struct Semaphore *s)
}
else
{
}
else
{
- ASSERT(
ISLIST
EMPTY(&s->wait_queue));
+ ASSERT(
LIST_
EMPTY(&s->wait_queue));
/* The semaphore was free: lock it */
s->owner = CurrentProcess;
/* The semaphore was free: lock it */
s->owner = CurrentProcess;
@@
-178,7
+183,7
@@
void sem_release(struct Semaphore *s)
s->owner = NULL;
/* Give semaphore to the first applicant, if any */
s->owner = NULL;
/* Give semaphore to the first applicant, if any */
- if (UNLIKELY((proc = (Process *)
REMHEAD
(&s->wait_queue))))
+ if (UNLIKELY((proc = (Process *)
list_remHead
(&s->wait_queue))))
{
s->nest_count = 1;
s->owner = proc;
{
s->nest_count = 1;
s->owner = proc;