aboutsummaryrefslogtreecommitdiffstats
path: root/src/chsem.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2007-11-19 15:57:39 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2007-11-19 15:57:39 +0000
commit15a9943b535f3f5e7c867d35d6da230504db86bb (patch)
tree3fea27e7cbf5b9455bfbad0efbbe16a875703cef /src/chsem.c
parentba20b5cd23ae74c1f4f925b7b8d3a84dbd42fd9e (diff)
downloadChibiOS-15a9943b535f3f5e7c867d35d6da230504db86bb.tar.gz
ChibiOS-15a9943b535f3f5e7c867d35d6da230504db86bb.tar.bz2
ChibiOS-15a9943b535f3f5e7c867d35d6da230504db86bb.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@99 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src/chsem.c')
-rw-r--r--src/chsem.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/chsem.c b/src/chsem.c
index 099dc4db4..6f24b08ec 100644
--- a/src/chsem.c
+++ b/src/chsem.c
@@ -54,7 +54,7 @@ void chSemReset(Semaphore *sp, t_cnt n) {
sp->s_cnt = n;
if (cnt < 0) {
while (cnt++)
- chSchReadyI(fifo_remove(&sp->s_queue))->p_rdymsg = RDY_RESET;
+ chSchReadyI(fifo_remove(&sp->s_queue), RDY_RESET);
chSchRescheduleS();
}
@@ -76,7 +76,7 @@ void chSemResetI(Semaphore *sp, t_cnt n) {
cnt = sp->s_cnt;
sp->s_cnt = n;
while (cnt++ < 0)
- chSchReadyI(fifo_remove(&sp->s_queue))->p_rdymsg = RDY_RESET;
+ chSchReadyI(fifo_remove(&sp->s_queue), RDY_RESET);
}
/**
@@ -118,7 +118,7 @@ static void wakeup(void *p) {
chDbgPanic("chsem.c, wakeup()\r\n");
#endif
chSemFastSignalI(((Thread *)p)->p_semp);
- chSchReadyI(dequeue(p))->p_rdymsg = RDY_TIMEOUT;
+ chSchReadyI(dequeue(p), RDY_TIMEOUT);
}
/**
@@ -205,7 +205,7 @@ void chSemSignal(Semaphore *sp) {
void chSemSignalI(Semaphore *sp) {
if (sp->s_cnt++ < 0)
- chSchReadyI(fifo_remove(&sp->s_queue));
+ chSchReadyI(fifo_remove(&sp->s_queue), RDY_OK);
}
#ifdef CH_USE_SEMSW
@@ -221,7 +221,7 @@ void chSemSignalWait(Semaphore *sps, Semaphore *spw) {
chSysLock();
if (sps->s_cnt++ < 0)
- chSchReadyI(fifo_remove(&sps->s_queue));
+ chSchReadyI(fifo_remove(&sps->s_queue), RDY_OK);
if (--spw->s_cnt < 0) {
fifo_insert(currp, &spw->s_queue);
@@ -289,7 +289,7 @@ void chSemLowerPrioSignal(Semaphore *sp) {
if (!--currp->p_rtcnt) {
currp->p_prio -= MEPRIO;
if (sp->s_cnt++ < 0)
- chSchReadyI(fifo_remove(&sp->s_queue));
+ chSchReadyI(fifo_remove(&sp->s_queue), RDY_OK);
chSchRescheduleS();
}
else if (sp->s_cnt++ < 0)
@@ -312,7 +312,7 @@ void chSemRaisePrioSignalWait(Semaphore *sps, Semaphore *spw) {
chSysLock();
if (sps->s_cnt++ < 0)
- chSchReadyI(fifo_remove(&sps->s_queue));
+ chSchReadyI(fifo_remove(&sps->s_queue), RDY_OK);
if (--spw->s_cnt < 0) {
prioenq(currp, &spw->s_queue);
@@ -348,7 +348,7 @@ void chSemLowerPrioSignalWait(Semaphore *sps, Semaphore *spw) {
currp->p_prio -= MEPRIO;
if (sps->s_cnt++ < 0)
- chSchReadyI(fifo_remove(&sps->s_queue));
+ chSchReadyI(fifo_remove(&sps->s_queue), RDY_OK);
if (--spw->s_cnt < 0) {
fifo_insert(currp, &spw->s_queue); // fifo_insert() because the spw is a normal sem.