MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / addWaitingNativeSocket

Function addWaitingNativeSocket

source/kernel/knativesocket.cpp:213–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211#endif
212
213void addWaitingNativeSocket(const std::shared_ptr<KNativeSocketObject>& s) {
214 BOXEDWINE_CRITICAL_SECTION_WITH_MUTEX(waitingNodeMutex);
215 for (auto& waitingSocket : waitingNativeSockets) {
216 if (waitingSocket->nativeSocket == s->nativeSocket) {
217 return;
218 }
219 }
220
221 waitingNativeSockets.push_back(s);
222#ifdef BOXEDWINE_MULTI_THREADED
223 startNativeSocketsThread();
224 char buf = 2;
225 ::send(nativeSocketPipe[1], &buf, 1, 0);
226#endif
227}
228
229void removeWaitingSocket(S32 nativeSocket) {
230 {

Callers 3

handleNativeSocketErrorFunction · 0.85
waitForEventsMethod · 0.85
connectMethod · 0.85

Calls 2

startNativeSocketsThreadFunction · 0.85
push_backMethod · 0.45

Tested by

no test coverage detected