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

Function lwp_pid_wait_for_empty

components/lwp/lwp_pid.c:94–107  ·  view source on GitHub ↗

* @brief Wait for an empty PID slot to become available * * @param[in] wait_flags Wait mode flags (RT_INTERRUPTIBLE, RT_KILLABLE or RT_UNINTERRUPTIBLE) * @param[in] to Timeout value in ticks (RT_WAITING_FOREVER for no timeout) * * @return int Error code (0 on success, negative on error) */

Source from the content-addressed store, hash-verified

92 * @return int Error code (0 on success, negative on error)
93 */
94int lwp_pid_wait_for_empty(int wait_flags, rt_tick_t to)
95{
96 int error;
97
98 if (wait_flags == RT_INTERRUPTIBLE)
99 {
100 error = rt_wqueue_wait_interruptible(&_pid_emptyq, 0, to);
101 }
102 else
103 {
104 error = rt_wqueue_wait_killable(&_pid_emptyq, 0, to);
105 }
106 return error;
107}
108
109/**
110 * @brief Acquire the PID management mutex lock

Callers 1

_teardown_entryFunction · 0.85

Calls 2

rt_wqueue_wait_killableFunction · 0.85

Tested by

no test coverage detected