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

Function lwp_pgrp_critical_enter

components/lwp/lwp_internal.c:142–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142rt_err_t lwp_pgrp_critical_enter(struct rt_processgroup *pgrp, int flags)
143{
144 rt_err_t rc;
145 do {
146 rc = lwp_mutex_take_safe(&pgrp->mutex, RT_WAITING_FOREVER, flags);
147 } while (rc != RT_EOK && !(flags & LWP_MTX_FLAGS_INTR) && rc == -RT_EINTR);
148
149 /* if current process is force killed */
150 if (rc != RT_EOK && rc != -RT_EINTR)
151 {
152 LOG_I("%s: unexpected return code = %ld", __func__, rc);
153 }
154
155 return rc;
156}
157
158rt_err_t lwp_pgrp_critical_exit(struct rt_processgroup *pgrp)
159{

Callers

nothing calls this directly

Calls 1

lwp_mutex_take_safeFunction · 0.85

Tested by

no test coverage detected