More build fixes

This commit is contained in:
2025-11-09 17:10:08 +11:00
parent ea7cd4638c
commit d4dcead4f2
9 changed files with 129 additions and 117 deletions
-20
View File
@@ -27,26 +27,6 @@ struct DN_NETCurlRingEvent
DN_NETWSSend ws_send;
};
struct DN_NETCurlCore
{
// NOTE: Shared w/ user and networking thread
DN_Ring ring;
DN_OSMutex ring_mutex;
bool kill_thread;
DN_OSMutex list_mutex; // Lock for request, response, deinit, free list
DN_NETRequest *request_list; // Current requests submitted by the user thread awaiting to move into the thread request list
DN_NETRequest *response_list; // Finished requests that are to be deqeued by the user via wait for response
DN_NETRequest *deinit_list; // Requests that are finished and are awaiting to be de-initialised by the CURL thread
DN_NETRequest *free_list; // Request pool that new requests will use before allocating
// NOTE: Networking thread only
DN_NETRequest *thread_request_list; // Current requests being executed by the CURL thread.
// This list is exclusively owned by the CURL thread so no locking is needed
DN_OSThread thread;
void *thread_curlm;
};
static DN_NETCurlRequest *DN_NET_CurlRequestFromRequest_(DN_NETRequest *req)
{
DN_NETCurlRequest *result = req ? DN_Cast(DN_NETCurlRequest *) req->context[0] : 0;
+21
View File
@@ -3,6 +3,27 @@
#include "dn_net.h"
struct DN_NETCurlCore
{
// NOTE: Shared w/ user and networking thread
DN_Ring ring;
DN_OSMutex ring_mutex;
bool kill_thread;
DN_OSMutex list_mutex; // Lock for request, response, deinit, free list
DN_NETRequest *request_list; // Current requests submitted by the user thread awaiting to move into the thread request list
DN_NETRequest *response_list; // Finished requests that are to be deqeued by the user via wait for response
DN_NETRequest *deinit_list; // Requests that are finished and are awaiting to be de-initialised by the CURL thread
DN_NETRequest *free_list; // Request pool that new requests will use before allocating
// NOTE: Networking thread only
DN_NETRequest *thread_request_list; // Current requests being executed by the CURL thread.
// This list is exclusively owned by the CURL thread so no locking is needed
DN_OSThread thread;
void *thread_curlm;
};
#define DN_NET_CurlCoreFromNet(net) ((net) ? (DN_Cast(DN_NETCurlCore *)(net)->context) : nullptr);
DN_NETInterface DN_NET_CurlInterface ();
void DN_NET_CurlInit (DN_NETCore *net, char *base, DN_U64 base_size);
void DN_NET_CurlDeinit (DN_NETCore *net);
+1 -1
View File
@@ -2119,7 +2119,7 @@ static DN_UTCore DN_Tests_Str8()
DN_UT_AssertF(&result, size == 5, "size=%zu", size);
}
char arena_base[256];
char arena_base[512];
for (DN_UT_Test(&result, "Str8 format from arena")) {
DN_Arena arena = DN_ArenaFromBuffer(arena_base, sizeof(arena_base), DN_ArenaFlags_Nil);
DN_Str8 str8 = DN_Str8FromFmtArena(&arena, "Foo Bar %d", 5);