MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / socketSetPending

Function socketSetPending

modules/network/socket/lwip/modSocket.c:1279–1302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1277}
1278
1279void socketSetPending(xsSocket xss, uint8_t pending)
1280{
1281 uint8_t doSchedule;
1282
1283 modCriticalSectionBegin();
1284
1285 if (((xss->pending & pending) == pending) || (xss->pending & kPendingClose)) {
1286 modCriticalSectionEnd();
1287 return;
1288 }
1289
1290 doSchedule = 0 == xss->pending;
1291 xss->pending |= pending;
1292
1293 if (doSchedule && (xss->constructed || (pending & kPendingAcceptListener))) {
1294 socketUpUseCount(xss->the, xss);
1295 modCriticalSectionEnd();
1296
1297 if (!xss->suspended)
1298 modMessagePostToMachine(xss->the, NULL, 0, socketClearPending, xss);
1299 }
1300 else
1301 modCriticalSectionEnd();
1302}
1303
1304void socketClearPending(void *the, void *refcon, uint8_t *message, uint16_t messageLength)
1305{

Callers 13

modSocket.cFile · 0.85
xs_socket_closeFunction · 0.85
xs_socket_readFunction · 0.85
xs_socket_writeFunction · 0.85
didFindDNSFunction · 0.85
didErrorFunction · 0.85
didConnectFunction · 0.85
didReceiveFunction · 0.85
didSendFunction · 0.85
didReceiveUDPFunction · 0.85
xs_listener_closeFunction · 0.85
didAcceptFunction · 0.85

Calls 2

socketUpUseCountFunction · 0.70
modMessagePostToMachineFunction · 0.50

Tested by

no test coverage detected