Skip to content

Commit

Permalink
Update msgqueue and thrdpool.
Browse files Browse the repository at this point in the history
  • Loading branch information
Barenboim committed Jul 16, 2023
1 parent ccc2e59 commit a384466
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions src/kernel/msgqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,7 @@ void *msgqueue_get(msgqueue_t *queue)
*queue->get_head = *(void **)*queue->get_head;
}
else
{
msg = NULL;
errno = ENOENT;
}

pthread_mutex_unlock(&queue->get_mutex);
return msg;
Expand Down
2 changes: 1 addition & 1 deletion src/kernel/thrdpool.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ thrdpool_t *thrdpool_create(size_t nthreads, size_t stacksize)
if (!pool)
return NULL;

pool->msgqueue = msgqueue_create((size_t)-1, 0);
pool->msgqueue = msgqueue_create(0, 0);
if (pool->msgqueue)
{
ret = pthread_mutex_init(&pool->mutex, NULL);
Expand Down

0 comments on commit a384466

Please sign in to comment.