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

Function lwp_critical_enter

components/lwp/lwp_internal.c:121–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121rt_err_t lwp_critical_enter(struct rt_lwp *lwp, int flags)
122{
123 rt_err_t rc;
124 do {
125 rc = lwp_mutex_take_safe(&lwp->lwp_lock, RT_WAITING_FOREVER, flags);
126 } while (rc != RT_EOK && !(flags & LWP_MTX_FLAGS_INTR) && rc == -RT_EINTR);
127
128 /* if current process is force killed */
129 if (rc != RT_EOK && rc != -RT_EINTR)
130 {
131 LOG_I("%s: unexpected return code = %ld", __func__, rc);
132 }
133
134 return rc;
135}
136
137rt_err_t lwp_critical_exit(struct rt_lwp *lwp)
138{

Callers

nothing calls this directly

Calls 1

lwp_mutex_take_safeFunction · 0.85

Tested by

no test coverage detected