MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / get

Method get

components/libc/cplusplus/os/cxx_queue.h:56–66  ·  view source on GitHub ↗

Get a message or Wait for a message from a Queue. @param millisec timeout value or 0 in case of no time-out. (default: osWaitForever). @return bool . */

Source from the content-addressed store, hash-verified

54 @return bool .
55 */
56 bool get(T& data, int32_t millisec = WAIT_FOREVER)
57 {
58 rt_int32_t tick;
59
60 if (millisec < 0)
61 tick = -1;
62 else
63 tick = rt_tick_from_millisecond(millisec);
64
65 return rt_mq_recv(&mID, &data, sizeof(data), tick) >= 0;
66 }
67
68private:
69 struct rt_messagequeue mID;

Callers

nothing calls this directly

Calls 2

rt_tick_from_millisecondFunction · 0.85
rt_mq_recvFunction · 0.85

Tested by

no test coverage detected