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

Function lwp_session_insert

components/lwp/lwp_session.c:140–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140int lwp_session_insert(rt_session_t session, rt_processgroup_t group)
141{
142 /* parameter check */
143 if (session == RT_NULL || group == RT_NULL)
144 {
145 return -EINVAL;
146 }
147
148 SESS_LOCK_NESTED(session);
149 PGRP_LOCK_NESTED(group);
150
151 group->sid = session->sid;
152 group->session = session;
153 lwp_pgrp_update_children_info(group, session->sid, group->pgid);
154 rt_list_insert_after(&(session->processgroup), &(group->pgrp_list_node));
155
156 PGRP_UNLOCK(group);
157 SESS_UNLOCK(session);
158
159 return 0;
160}
161
162int lwp_session_remove(rt_session_t session, rt_processgroup_t group)
163{

Callers 3

lwp_execveFunction · 0.85
lwp_session_moveFunction · 0.85
sys_setpgidFunction · 0.85

Calls 2

rt_list_insert_afterFunction · 0.85

Tested by

no test coverage detected