From fe2f8298009c4e8fc3b7904b07dc2ba3afc4a045 Mon Sep 17 00:00:00 2001 From: Tomas Mudrunka Date: Tue, 29 Jun 2021 14:57:18 +0200 Subject: [PATCH] Assert for missing feature --- c/pthread_extra/pthread_msgqueue.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/c/pthread_extra/pthread_msgqueue.c b/c/pthread_extra/pthread_msgqueue.c index 52395d6..44ad399 100644 --- a/c/pthread_extra/pthread_msgqueue.c +++ b/c/pthread_extra/pthread_msgqueue.c @@ -75,6 +75,9 @@ bool pthread_mq_send_generic(pthread_mq_t *mq, void * data, pthread_mq_flags_t f } } + //Handle overwrite + assert(!(flags & PTHREAD_XMQ_OVERW) && "FIXME: Overwrite not implemented yet!"); + //Write data to queue bool to_front = (flags & PTHREAD_XMQ_FRONT); size_t idx = ( ( mq->head_idx + (to_front?mq->msg_count_max-1:mq->msg_count) ) % mq->msg_count_max ); -- 2.30.2