Skip to content

Commit

Permalink
updated push functions
Browse files Browse the repository at this point in the history
  • Loading branch information
rajszym committed May 21, 2018
1 parent 1f71636 commit fdb5035
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions StateOS/kernel/src/oseventqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
******************************************************************************
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions StateOS/kernel/src/osjobqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
******************************************************************************
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions StateOS/kernel/src/osmailboxqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
******************************************************************************
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit fdb5035

Please sign in to comment.