From fdb50356ea8b205fb3fbeb74dae2d3685b53e8c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rajmund=20Szyma=C5=84ski?= Date: Mon, 21 May 2018 06:15:41 +0200 Subject: [PATCH] updated push functions --- StateOS/kernel/src/oseventqueue.c | 4 ++-- StateOS/kernel/src/osjobqueue.c | 4 ++-- StateOS/kernel/src/osmailboxqueue.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/StateOS/kernel/src/oseventqueue.c b/StateOS/kernel/src/oseventqueue.c index 68629c28..a8288807 100644 --- a/StateOS/kernel/src/oseventqueue.c +++ b/StateOS/kernel/src/oseventqueue.c @@ -2,7 +2,7 @@ @file StateOS: oseventqueue.c @author Rajmund Szymanski - @date 20.05.2018 + @date 21.05.2018 @brief This file provides set of functions for StateOS. ****************************************************************************** @@ -272,7 +272,7 @@ unsigned evq_push( evq_t *evq, unsigned data ) port_sys_lock(); - if (evq->count < evq->limit || evq->queue == 0) + if (evq->count == 0 || evq->queue == 0) { priv_evq_put(evq, data); if (evq->count > evq->limit) diff --git a/StateOS/kernel/src/osjobqueue.c b/StateOS/kernel/src/osjobqueue.c index b47b870b..a6cf889d 100644 --- a/StateOS/kernel/src/osjobqueue.c +++ b/StateOS/kernel/src/osjobqueue.c @@ -2,7 +2,7 @@ @file StateOS: osjobqueue.c @author Rajmund Szymanski - @date 20.05.2018 + @date 21.05.2018 @brief This file provides set of functions for StateOS. ****************************************************************************** @@ -285,7 +285,7 @@ unsigned job_push( job_t *job, fun_t *fun ) port_sys_lock(); - if (job->count < job->limit || job->queue == 0) + if (job->count == 0 || job->queue == 0) { priv_job_put(job, fun); if (job->count > job->limit) diff --git a/StateOS/kernel/src/osmailboxqueue.c b/StateOS/kernel/src/osmailboxqueue.c index ef4168ec..43f30084 100644 --- a/StateOS/kernel/src/osmailboxqueue.c +++ b/StateOS/kernel/src/osmailboxqueue.c @@ -2,7 +2,7 @@ @file StateOS: osmailboxqueue.c @author Rajmund Szymanski - @date 20.05.2018 + @date 21.05.2018 @brief This file provides set of functions for StateOS. ****************************************************************************** @@ -286,7 +286,7 @@ unsigned box_push( box_t *box, const void *data ) port_sys_lock(); - if (box->count < box->limit || box->queue == 0) + if (box->count == 0 || box->queue == 0) { priv_box_put(box, data); if (box->count > box->limit)