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

Function rt_prio_queue_init

components/vbus/prio_queue.c:60–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60rt_err_t rt_prio_queue_init(struct rt_prio_queue *que,
61 const char *name,
62 void *buf,
63 rt_size_t bufsz,
64 rt_size_t itemsz)
65{
66 RT_ASSERT(que);
67
68 rt_memset(que, 0, sizeof(*que));
69
70 rt_list_init(&(que->suspended_pop_list));
71
72 rt_mp_init(&que->pool, name, buf, bufsz,
73 sizeof(struct rt_prio_queue_item) + itemsz);
74
75 que->item_sz = itemsz;
76
77 return RT_EOK;
78}
79
80void rt_prio_queue_detach(struct rt_prio_queue *que)
81{

Callers 1

rt_prio_queue_createFunction · 0.85

Calls 3

rt_memsetFunction · 0.85
rt_list_initFunction · 0.85
rt_mp_initFunction · 0.85

Tested by

no test coverage detected