MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / HttpBackend_Add

Function HttpBackend_Add

src/Http_Worker.c:867–879  ·  view source on GitHub ↗

Adds a req to the list of pending requests, waking up worker thread if needed */

Source from the content-addressed store, hash-verified

865
866/* Adds a req to the list of pending requests, waking up worker thread if needed */
867static void HttpBackend_Add(struct HttpRequest* req, cc_uint8 flags) {
868#if defined CC_BUILD_PSP || defined CC_BUILD_NDS
869 /* TODO why doesn't threading work properly on PSP */
870 DoRequest(req);
871#else
872 Mutex_Lock(pendingMutex);
873 {
874 RequestList_Append(&pendingReqs, req, flags);
875 }
876 Mutex_Unlock(pendingMutex);
877 Waitable_Signal(workerWaitable);
878#endif
879}
880
881/*########################################################################################################################*
882*-----------------------------------------------------Http component------------------------------------------------------*

Callers 1

Http_AddFunction · 0.70

Calls 5

DoRequestFunction · 0.85
RequestList_AppendFunction · 0.85
Mutex_LockFunction · 0.70
Mutex_UnlockFunction · 0.70
Waitable_SignalFunction · 0.70

Tested by

no test coverage detected