StateOS
Loading...
Searching...
No Matches
osmessagequeue.h
1/******************************************************************************
2
3 @file StateOS: osmessagequeue.h
4 @author Rajmund Szymanski
5 @date 17.11.2025
6 @brief This file contains definitions for StateOS.
7
8 ******************************************************************************
9
10 Copyright (c) 2018-2022 Rajmund Szymanski. All rights reserved.
11
12 Permission is hereby granted, free of charge, to any person obtaining a copy
13 of this software and associated documentation files (the "Software"), to
14 deal in the Software without restriction, including without limitation the
15 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
16 sell copies of the Software, and to permit persons to whom the Software is
17 furnished to do so, subject to the following conditions:
18
19 The above copyright notice and this permission notice shall be included
20 in all copies or substantial portions of the Software.
21
22 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
23 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
25 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
28 IN THE SOFTWARE.
29
30 ******************************************************************************/
31
32#ifndef __STATEOS_MSG_H
33#define __STATEOS_MSG_H
34
35#include "oskernel.h"
36#include "osclock.h"
37
43
47
48typedef struct __msh msh_t;
49
50__PACKED_STRUCT __msh
51{
52 size_t size;
53#ifndef __cplusplus // ISO C++ forbids flexible array member
54 char data[];
55#endif
56};
57
58#define MSG_SIZE( size ) \
59 ( (size_t)( size ) + sizeof(msh_t) )
60
64
65typedef struct __msg msg_t;
66
67struct __msg
68{
69 obj_t obj;
70
71 size_t count;
72 size_t limit;
73 size_t size;
74
75 size_t head;
76 size_t tail;
77 char * data;
78};
79
80typedef struct __msg msg_id [];
81
82/******************************************************************************
83 *
84 * Name : _MSG_INIT
85 *
86 * Description : create and initialize a message queue object
87 *
88 * Parameters
89 * limit : size of a queue (max number of stored messages)
90 * size : max size of a single message (in bytes)
91 * data : message queue data buffer
92 *
93 * Return : message queue object
94 *
95 * Note : for internal use
96 *
97 ******************************************************************************/
98
99#define _MSG_INIT( _limit, _size, _data ) \
100 { _OBJ_INIT(), 0, _limit * MSG_SIZE(_size), MSG_SIZE(_size), 0, 0, _data }
101
102/******************************************************************************
103 *
104 * Name : _MSG_DATA
105 *
106 * Description : create a message queue data
107 *
108 * Parameters
109 * limit : size of a queue (max number of stored messages)
110 * size : max size of a single message (in bytes)
111 *
112 * Return : message queue data
113 *
114 * Note : for internal use
115 *
116 ******************************************************************************/
117
118#ifndef __cplusplus
119#define _MSG_DATA( _limit, _size ) (char[_limit * MSG_SIZE(_size)]){ 0 }
120#endif
121
130#define OS_MSG_BUFFER( buf, limit, size ) \
131 char buf[limit * MSG_SIZE(size)]
132
141#define OS_MSG( msg, limit, size ) \
142 static char msg##__buf[limit * MSG_SIZE(size)]; \
143 msg_t msg[] = { _MSG_INIT( limit, size, msg##__buf ) }
144
145/** static alias of OS_MSG() */
146#define static_MSG( msg, limit, size ) \
147 static char msg##__buf[limit * MSG_SIZE(size)]; \
148 static msg_t msg[] = { _MSG_INIT( limit, size, msg##__buf ) }
149
160
161#ifndef __cplusplus
162#define MSG_INIT( limit, size ) \
163 _MSG_INIT( limit, size, _MSG_DATA( limit, size ) )
164#endif
165
176
177#ifndef __cplusplus
178#define MSG_CREATE( limit, size ) \
179 { MSG_INIT ( limit, size ) }
180/** alias of MSG_CREATE() */
181#define MSG_NEW \
182 MSG_CREATE
183#endif
184
185#ifdef __cplusplus
186extern "C" {
187#endif
188
200void msg_init( msg_t *msg, size_t size, void *data, size_t bufsize );
201
214msg_t *msg_create( unsigned limit, size_t size );
215
217__STATIC_INLINE
218msg_t *msg_new( unsigned limit, size_t size ) { return msg_create(limit, size); }
219
228void msg_reset( msg_t *msg );
229
231__STATIC_INLINE
232void msg_kill( msg_t *msg ) { msg_reset(msg); }
233
242void msg_destroy( msg_t *msg );
243
245__STATIC_INLINE
246void msg_delete( msg_t *msg ) { msg_destroy(msg); }
247
266int msg_take( msg_t *msg, void *data, size_t size, size_t *read );
267
269__STATIC_INLINE
270int msg_tryWait( msg_t *msg, void *data, size_t size, size_t *read ) { return msg_take(msg, data, size, read); }
271
273__STATIC_INLINE
274int msg_takeISR( msg_t *msg, void *data, size_t size, size_t *read ) { return msg_take(msg, data, size, read); }
275
276#if OS_ATOMICS
278int msg_takeAsync( msg_t *msg, void *data, size_t size, size_t *read );
279#endif
280
302int msg_waitFor( msg_t *msg, void *data, size_t size, size_t *read, cnt_t delay );
303
323int msg_waitUntil( msg_t *msg, void *data, size_t size, size_t *read, cnt_t time );
324
344
345__STATIC_INLINE
346int msg_wait( msg_t *msg, void *data, size_t size, size_t *read ) { return msg_waitFor(msg, data, size, read, INFINITE); }
347
348#if OS_ATOMICS
350int msg_waitAsync( msg_t *msg, void *data, size_t size, size_t *read );
351#endif
352
370int msg_give( msg_t *msg, const void *data, size_t size );
371
373__STATIC_INLINE
374int msg_giveISR( msg_t *msg, const void *data, size_t size ) { return msg_give(msg, data, size); }
375
376#if OS_ATOMICS
378int msg_giveAsync( msg_t *msg, const void *data, size_t size );
379#endif
380
401int msg_sendFor( msg_t *msg, const void *data, size_t size, cnt_t delay );
402
421int msg_sendUntil( msg_t *msg, const void *data, size_t size, cnt_t time );
422
441
442__STATIC_INLINE
443int msg_send( msg_t *msg, const void *data, size_t size ) { return msg_sendFor(msg, data, size, INFINITE); }
444
445#if OS_ATOMICS
447int msg_sendAsync( msg_t *msg, const void *data, size_t size );
448#endif
449
465int msg_push( msg_t *msg, const void *data, size_t size );
466
468__STATIC_INLINE
469int msg_pushISR( msg_t *msg, const void *data, size_t size ) { return msg_push(msg, data, size); }
470
482size_t msg_count( msg_t *msg );
483
485__STATIC_INLINE
486size_t msg_countISR( msg_t *msg ) { return msg_count(msg); }
487
499size_t msg_space( msg_t *msg );
500
502__STATIC_INLINE
503size_t msg_spaceISR( msg_t *msg ) { return msg_space(msg); }
504
516size_t msg_limit( msg_t *msg );
517
519__STATIC_INLINE
520size_t msg_limitISR( msg_t *msg ) { return msg_limit(msg); }
521
532
533__STATIC_INLINE
534size_t msg_size( msg_t *msg ) { return msg->size - sizeof(size_t); }
535
537__STATIC_INLINE
538size_t msg_sizeISR( msg_t *msg ) { return msg_size(msg); }
539
540#ifdef __cplusplus
541}
542#endif
543
544/* -------------------------------------------------------------------------- */
545
546#if defined(__cplusplus) && (__cplusplus >= 201103L) && !defined(__STATEOS_STDCXX)
547namespace stateos {
548
556
557template<unsigned limit_, size_t size_>
558struct MessageQueueT : public __msg
559{
561 constexpr
562 MessageQueueT(): __msg _MSG_INIT(limit_, size_, data_) {}
563
564 ~MessageQueueT() { assert(__msg::obj.queue == nullptr); }
565
566 /// move constructor
567 MessageQueueT( MessageQueueT&& _src ): __msg _MSG_INIT(limit_, size_, data_)
568 {
569 assert(_src.__msg::count == 0 && _src.obj.queue == nullptr);
570 (void) _src;
571 }
572
573 MessageQueueT( const MessageQueueT& ) = delete;
574 MessageQueueT& operator=( MessageQueueT&& ) = delete;
575 MessageQueueT& operator=( const MessageQueueT& ) = delete;
577 void reset () { msg_reset (this); }
578 void kill () { msg_kill (this); }
579 void destroy () { msg_destroy (this); }
580 int take ( void *_data, size_t _size, size_t *_read = nullptr ) { return msg_take (this, _data, _size, _read); }
581 int tryWait ( void *_data, size_t _size, size_t *_read = nullptr ) { return msg_tryWait (this, _data, _size, _read); }
582 int takeISR ( void *_data, size_t _size, size_t *_read = nullptr ) { return msg_takeISR (this, _data, _size, _read); }
583 template<typename T>
584 int waitFor ( void *_data, size_t _size, size_t *_read, const T& _delay ) { return msg_waitFor (this, _data, _size, _read, Clock::count(_delay)); }
585 template<typename T>
586 int waitUntil( void *_data, size_t _size, size_t *_read, const T& _time ) { return msg_waitUntil(this, _data, _size, _read, Clock::until(_time)); }
587 int wait ( void *_data, size_t _size, size_t *_read = nullptr ) { return msg_wait (this, _data, _size, _read); }
588 int give ( const void *_data, size_t _size ) { return msg_give (this, _data, _size); }
589 int giveISR ( const void *_data, size_t _size ) { return msg_giveISR (this, _data, _size); }
590 template<typename T>
591 int sendFor ( const void *_data, size_t _size, const T& _delay ) { return msg_sendFor (this, _data, _size, Clock::count(_delay)); }
592 template<typename T>
593 int sendUntil( const void *_data, size_t _size, const T& _time ) { return msg_sendUntil(this, _data, _size, Clock::until(_time)); }
594 int send ( const void *_data, size_t _size ) { return msg_send (this, _data, _size); }
595 int push ( const void *_data, size_t _size ) { return msg_push (this, _data, _size); }
596 int pushISR ( const void *_data, size_t _size ) { return msg_pushISR (this, _data, _size); }
597 size_t count () { return msg_count (this); }
598 size_t countISR () { return msg_countISR (this); }
599 size_t space () { return msg_space (this); }
600 size_t spaceISR () { return msg_spaceISR (this); }
601 size_t limit () { return msg_limit (this); }
602 size_t limitISR () { return msg_limitISR (this); }
603 size_t size () { return msg_size (this); }
604 size_t sizeISR () { return msg_sizeISR (this); }
605#if OS_ATOMICS
606 int takeAsync( void *_data, size_t _size, size_t *_read = nullptr ) { return msg_takeAsync(this, _data, _size, _read); }
607 int waitAsync( void *_data, size_t _size, size_t *_read = nullptr ) { return msg_waitAsync(this, _data, _size, _read); }
608 int giveAsync( const void *_data, size_t _size ) { return msg_giveAsync(this, _data, _size); }
609 int sendAsync( const void *_data, size_t _size ) { return msg_sendAsync(this, _data, _size); }
610#endif
611
612#if __cplusplus >= 201402L
613 using Ptr = std::unique_ptr<MessageQueueT<limit_, size_>>;
614#else
616#endif
617
628
629 static
630 Ptr Create()
631 {
632 auto msg = new (std::nothrow) MessageQueueT<limit_, size_>();
633 if (msg != nullptr)
634 msg->__msg::obj.res = msg;
635 return Ptr(msg);
636 }
637
638 private:
639 char data_[limit_ * MSG_SIZE(size_)];
640};
641
649
650template<unsigned limit_, class C>
651struct MessageQueueTT : public MessageQueueT<limit_, sizeof(C)>
652{
654 constexpr
655 MessageQueueTT(): MessageQueueT<limit_, sizeof(C)>() {}
657 int take ( C *_data, size_t *_read = nullptr ) { return msg_take (this, _data, sizeof(C), _read); }
658 int tryWait ( C *_data, size_t *_read = nullptr ) { return msg_tryWait (this, _data, sizeof(C), _read); }
659 int takeISR ( C *_data, size_t *_read = nullptr ) { return msg_takeISR (this, _data, sizeof(C), _read); }
660 template<typename T>
661 int waitFor ( C *_data, size_t *_read, const T& _delay ) { return msg_waitFor (this, _data, sizeof(C), _read, Clock::count(_delay)); }
662 template<typename T>
663 int waitUntil( C *_data, size_t *_read, const T& _time ) { return msg_waitUntil(this, _data, sizeof(C), _read, Clock::until(_time)); }
664 int wait ( C *_data, size_t *_read = nullptr ) { return msg_wait (this, _data, sizeof(C), _read); }
665 int give ( const C *_data ) { return msg_give (this, _data, sizeof(C)); }
666 int giveISR ( const C *_data ) { return msg_giveISR (this, _data, sizeof(C)); }
667 template<typename T>
668 int sendFor ( const C *_data, const T& _delay ) { return msg_sendFor (this, _data, sizeof(C), Clock::count(_delay)); }
669 template<typename T>
670 int sendUntil( const C *_data, const T& _time ) { return msg_sendUntil(this, _data, sizeof(C), Clock::until(_time)); }
671 int send ( const C *_data ) { return msg_send (this, _data, sizeof(C)); }
672 int push ( const C *_data ) { return msg_push (this, _data, sizeof(C)); }
673 int pushISR ( const C *_data ) { return msg_pushISR (this, _data, sizeof(C)); }
674#if OS_ATOMICS
675 int takeAsync( C *_data, size_t *_read = nullptr ) { return msg_takeAsync(this, _data, sizeof(C), _read); }
676 int waitAsync( C *_data, size_t *_read = nullptr ) { return msg_waitAsync(this, _data, sizeof(C), _read); }
677 int giveAsync( const C *_data ) { return msg_giveAsync(this, _data, sizeof(C)); }
678 int sendAsync( const C *_data ) { return msg_sendAsync(this, _data, sizeof(C)); }
679#endif
680
681#if __cplusplus >= 201402L
682 using Ptr = std::unique_ptr<MessageQueueTT<limit_, C>>;
683#else
685#endif
686
698
699 static
700 Ptr Create()
701 {
702 auto msg = new (std::nothrow) MessageQueueTT<limit_, C>();
703 if (msg != nullptr)
704 msg->__msg::obj.res = msg;
705 return Ptr(msg);
706 }
707
708};
709
710} // namespace
711#endif//__cplusplus
712
713/* -------------------------------------------------------------------------- */
714
716
717#endif//__STATEOS_MSG_H
#define INFINITE
infinite waiting
Definition osbase.h:261
int msg_sendAsync(msg_t *msg, const void *data, size_t size)
Async alias of msg_send().
int msg_push(msg_t *msg, const void *data, size_t size)
try to transfer data to the message queue object, remove the oldest data if the message queue object ...
void msg_destroy(msg_t *msg)
reset the message queue object, wake up all waiting tasks with 'E_DELETED' event value and free alloc...
void msg_delete(msg_t *msg)
alias of msg_destroy()
Definition osmessagequeue.h:245
int msg_sendUntil(msg_t *msg, const void *data, size_t size, cnt_t time)
try to transfer data to the message queue object, wait until given timepoint while the message queue ...
int msg_wait(msg_t *msg, void *data, size_t size, size_t *read)
try to transfer data from the message queue object, wait indefinitely while the message queue object ...
Definition osmessagequeue.h:345
size_t msg_count(msg_t *msg)
return the amount of data contained in the message queue
void msg_kill(msg_t *msg)
alias of msg_reset()
Definition osmessagequeue.h:231
size_t msg_countISR(msg_t *msg)
ISR alias of msg_count().
Definition osmessagequeue.h:485
int msg_give(msg_t *msg, const void *data, size_t size)
try to transfer data to the message queue object, don't wait if the message queue object is full
size_t msg_limitISR(msg_t *msg)
ISR alias of msg_limit().
Definition osmessagequeue.h:519
int msg_pushISR(msg_t *msg, const void *data, size_t size)
ISR alias of msg_push().
Definition osmessagequeue.h:468
char data[]
message data
Definition osmessagequeue.h:54
size_t msg_sizeISR(msg_t *msg)
ISR alias of msg_size().
Definition osmessagequeue.h:537
size_t msg_limit(msg_t *msg)
return the size of the message queue
int msg_waitFor(msg_t *msg, void *data, size_t size, size_t *read, cnt_t delay)
try to transfer data from the message queue object, wait for given duration of time while the message...
size_t msg_space(msg_t *msg)
return the amount of free space in the message queue
int msg_take(msg_t *msg, void *data, size_t size, size_t *read)
try to transfer data from the message queue object, don't wait if the message queue object is empty
int msg_send(msg_t *msg, const void *data, size_t size)
try to transfer data to the message queue object, wait indefinitely while the message queue object is...
Definition osmessagequeue.h:442
int msg_sendFor(msg_t *msg, const void *data, size_t size, cnt_t delay)
try to transfer data to the message queue object, wait for given duration of time while the message q...
msg_t * msg_create(unsigned limit, size_t size)
create and initialize a new message queue object
msg_t * msg_new(unsigned limit, size_t size)
alias of msg_create()
Definition osmessagequeue.h:217
void msg_reset(msg_t *msg)
reset the message queue object and wake up all waiting tasks with 'E_STOPPED' event value
int msg_tryWait(msg_t *msg, void *data, size_t size, size_t *read)
alias of msg_take()
Definition osmessagequeue.h:269
void msg_init(msg_t *msg, size_t size, void *data, size_t bufsize)
initialize a message queue object
int msg_giveAsync(msg_t *msg, const void *data, size_t size)
Async alias of msg_give().
size_t msg_spaceISR(msg_t *msg)
ISR alias of msg_space().
Definition osmessagequeue.h:502
struct __msh msh_t
message header
Definition osmessagequeue.h:48
int msg_giveISR(msg_t *msg, const void *data, size_t size)
ISR alias of msg_give().
Definition osmessagequeue.h:373
size_t msg_size(msg_t *msg)
return max size of a message in the message queue
Definition osmessagequeue.h:533
int msg_waitAsync(msg_t *msg, void *data, size_t size, size_t *read)
Async alias of msg_wait().
int msg_takeISR(msg_t *msg, void *data, size_t size, size_t *read)
ISR alias of msg_take().
Definition osmessagequeue.h:273
int msg_takeAsync(msg_t *msg, void *data, size_t size, size_t *read)
Async alias of msg_take().
int msg_waitUntil(msg_t *msg, void *data, size_t size, size_t *read, cnt_t time)
try to transfer data from the message queue object, wait until given timepoint while the message queu...
static constexpr rep count(const std::chrono::duration< _Rep, _Period > &_delay)
delay in ticks, rounded up to whole ticks; negative delay: IMMEDIATE, delay out of range: INFINITE
Definition osclock.h:109
static constexpr rep until(const std::chrono::time_point< Clock, _Duration > &_time)
time point in ticks, rounded up to whole ticks (only a time point of this clock)
Definition osclock.h:116
int sendFor(const C *_data, const T &_delay)
msg_sendFor()
Definition osmessagequeue.h:667
int sendUntil(const C *_data, const T &_time)
msg_sendUntil()
Definition osmessagequeue.h:669
int sendAsync(const C *_data)
msg_sendAsync()
Definition osmessagequeue.h:677
int giveISR(const C *_data)
msg_giveISR()
Definition osmessagequeue.h:665
int takeAsync(C *_data, size_t *_read=nullptr)
msg_takeAsync()
Definition osmessagequeue.h:674
int waitUntil(C *_data, size_t *_read, const T &_time)
msg_waitUntil()
Definition osmessagequeue.h:662
int pushISR(const C *_data)
msg_pushISR()
Definition osmessagequeue.h:672
constexpr MessageQueueTT()
constructor, see the constructor parameters of the class
Definition osmessagequeue.h:654
int send(const C *_data)
msg_send()
Definition osmessagequeue.h:670
int tryWait(C *_data, size_t *_read=nullptr)
msg_tryWait()
Definition osmessagequeue.h:657
static Ptr Create()
create dynamic object with manageable resources
Definition osmessagequeue.h:699
int takeISR(C *_data, size_t *_read=nullptr)
msg_takeISR()
Definition osmessagequeue.h:658
int push(const C *_data)
msg_push()
Definition osmessagequeue.h:671
int giveAsync(const C *_data)
msg_giveAsync()
Definition osmessagequeue.h:676
int waitAsync(C *_data, size_t *_read=nullptr)
msg_waitAsync()
Definition osmessagequeue.h:675
int take(C *_data, size_t *_read=nullptr)
msg_take()
Definition osmessagequeue.h:656
int wait(C *_data, size_t *_read=nullptr)
msg_wait()
Definition osmessagequeue.h:663
int give(const C *_data)
msg_give()
Definition osmessagequeue.h:664
int waitFor(C *_data, size_t *_read, const T &_delay)
msg_waitFor()
Definition osmessagequeue.h:660
std::unique_ptr< MessageQueueTT< limit_, C > > Ptr
result type of Create()
Definition osmessagequeue.h:681
create and initialize a message queue object
Definition osmessagequeue.h:558
size_t count()
msg_count()
Definition osmessagequeue.h:596
int waitFor(void *_data, size_t _size, size_t *_read, const T &_delay)
msg_waitFor()
Definition osmessagequeue.h:583
int sendUntil(const void *_data, size_t _size, const T &_time)
msg_sendUntil()
Definition osmessagequeue.h:592
size_t space()
msg_space()
Definition osmessagequeue.h:598
int sendAsync(const void *_data, size_t _size)
msg_sendAsync()
Definition osmessagequeue.h:608
size_t spaceISR()
msg_spaceISR()
Definition osmessagequeue.h:599
int push(const void *_data, size_t _size)
msg_push()
Definition osmessagequeue.h:594
int giveAsync(const void *_data, size_t _size)
msg_giveAsync()
Definition osmessagequeue.h:607
void destroy()
msg_destroy()
Definition osmessagequeue.h:578
size_t size()
msg_size()
Definition osmessagequeue.h:602
constexpr MessageQueueT()
constructor, see the constructor parameters of the class
Definition osmessagequeue.h:561
int takeAsync(void *_data, size_t _size, size_t *_read=nullptr)
msg_takeAsync()
Definition osmessagequeue.h:605
int giveISR(const void *_data, size_t _size)
msg_giveISR()
Definition osmessagequeue.h:588
int waitAsync(void *_data, size_t _size, size_t *_read=nullptr)
msg_waitAsync()
Definition osmessagequeue.h:606
size_t countISR()
msg_countISR()
Definition osmessagequeue.h:597
int pushISR(const void *_data, size_t _size)
msg_pushISR()
Definition osmessagequeue.h:595
void kill()
msg_kill()
Definition osmessagequeue.h:577
int send(const void *_data, size_t _size)
msg_send()
Definition osmessagequeue.h:593
int take(void *_data, size_t _size, size_t *_read=nullptr)
msg_take()
Definition osmessagequeue.h:579
size_t limitISR()
msg_limitISR()
Definition osmessagequeue.h:601
size_t sizeISR()
msg_sizeISR()
Definition osmessagequeue.h:603
int tryWait(void *_data, size_t _size, size_t *_read=nullptr)
msg_tryWait()
Definition osmessagequeue.h:580
int give(const void *_data, size_t _size)
msg_give()
Definition osmessagequeue.h:587
static Ptr Create()
create dynamic object with manageable resources
Definition osmessagequeue.h:629
void reset()
msg_reset()
Definition osmessagequeue.h:576
int sendFor(const void *_data, size_t _size, const T &_delay)
msg_sendFor()
Definition osmessagequeue.h:590
int wait(void *_data, size_t _size, size_t *_read=nullptr)
msg_wait()
Definition osmessagequeue.h:586
int takeISR(void *_data, size_t _size, size_t *_read=nullptr)
msg_takeISR()
Definition osmessagequeue.h:581
int waitUntil(void *_data, size_t _size, size_t *_read, const T &_time)
msg_waitUntil()
Definition osmessagequeue.h:585
std::unique_ptr< MessageQueueT< limit_, size_ > > Ptr
result type of Create()
Definition osmessagequeue.h:612
size_t limit()
msg_limit()
Definition osmessagequeue.h:600