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

Function tcpRelease

modules/io/socket/lwip/tcp.c:453–469  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

451}
452
453void tcpRelease(TCP tcp)
454{
455#if TCP_ATOMICS
456 if (0 == modAtomicsSubFetch(&tcp->useCount, 1))
457 xs_tcp_destructor(tcp);
458#else
459 uint8_t unused;
460
461 builtinCriticalSectionBegin();
462 tcp->useCount -= 1;
463 unused = 0 == tcp->useCount;
464 builtinCriticalSectionEnd();
465 if (unused)
466 xs_tcp_destructor(tcp);
467#endif
468
469}
470
471void tcpDeliver(void *the, void *refcon, uint8_t *message, uint16_t messageLength)
472{

Callers 2

doCloseFunction · 0.70
tcpDeliverFunction · 0.70

Calls 1

xs_tcp_destructorFunction · 0.70

Tested by

no test coverage detected