| 58 | } |
| 59 | |
| 60 | rt_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 | |
| 80 | void rt_prio_queue_detach(struct rt_prio_queue *que) |
| 81 | { |
no test coverage detected