MCPcopy Create free account
hub / github.com/apache/nuttx / netdev_upper_exit_thread

Function netdev_upper_exit_thread

drivers/net/netdev_upperhalf.c:1174–1198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1172 ****************************************************************************/
1173
1174static void netdev_upper_exit_thread(FAR struct netdev_upperhalf_s *upper)
1175{
1176 int cpu = 1;
1177
1178 switch (upper->lower->rxtype)
1179 {
1180 case NETDEV_RX_THREAD_RSS:
1181 cpu = CONFIG_SMP_NCPUS;
1182 case NETDEV_RX_THREAD:
1183 while (--cpu >= 0)
1184 {
1185 FAR struct netdev_thread_s *t = &upper->thread[cpu];
1186
1187 if (t->tid >= 0)
1188 {
1189 /* Try to tear down the dedicated thread for work. */
1190
1191 t->tid = INVALID_PROCESS_ID;
1192 nxsem_post(&t->sem);
1193 nxsem_wait(&t->sem_exit);
1194 }
1195 }
1196 break;
1197 }
1198}
1199
1200/****************************************************************************
1201 * Name: netdev_upper_ifup/ifdown/addmac/rmmac/ioctl

Callers 3

netdev_upper_ifupFunction · 0.85
netdev_upper_ifdownFunction · 0.85
netdev_lower_unregisterFunction · 0.85

Calls 2

nxsem_postFunction · 0.85
nxsem_waitFunction · 0.85

Tested by

no test coverage detected