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

Function sys_sem_delete

components/lwp/lwp_syscall.c:1738–1741  ·  view source on GitHub ↗

* @brief Deletes a semaphore and releases associated resources. * * This system call deletes an existing semaphore identified by the given handle `sem`. * It releases any resources associated with the semaphore and ensures that it is no longer * available for further synchronization operations. After deletion, the semaphore handle * is invalid and should not be used. * * @param sem The sema

Source from the content-addressed store, hash-verified

1736 * @see sys_sem_create(), sem_wait(), sem_post()
1737 */
1738sysret_t sys_sem_delete(rt_sem_t sem)
1739{
1740 return lwp_user_object_delete(lwp_self(), (rt_object_t)sem);
1741}
1742
1743/**
1744 * @brief Attempts to take (acquire) a semaphore.

Callers

nothing calls this directly

Calls 2

lwp_user_object_deleteFunction · 0.85
lwp_selfFunction · 0.85

Tested by

no test coverage detected