MCPcopy Index your code
hub / github.com/RT-Thread/rt-thread / _sem_object_init

Function _sem_object_init

src/ipc.c:321–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319 */
320
321static void _sem_object_init(rt_sem_t sem,
322 rt_uint16_t value,
323 rt_uint8_t flag,
324 rt_uint16_t max_value)
325{
326 /* initialize ipc object */
327 _ipc_object_init(&(sem->parent));
328
329 sem->max_value = max_value;
330 /* set initial value */
331 sem->value = value;
332
333 /* set parent */
334 sem->parent.parent.flag = flag;
335 rt_spin_lock_init(&(sem->spinlock));
336}
337
338/**
339 * @brief This function will initialize a static semaphore object.

Callers 2

rt_sem_initFunction · 0.85
rt_sem_createFunction · 0.85

Calls 2

_ipc_object_initFunction · 0.85
rt_spin_lock_initFunction · 0.70

Tested by

no test coverage detected