- Jan 20, 2024
-
-
Deucе authored
really no useful way to recover from failure.
-
Rob Swindell authored
-
Rob Swindell authored
This should fix the Clang warning that Deuce reported: str.cpp:131:18: warning: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior
-
Rob Swindell authored
-
Rob Swindell authored
Still using BOOL where we need Win32 API compatibility. Using JSBool instead of BOOL or bool where it matters. Changed most relevant TRUE/FALSE to true/false too (though it's not as critical). You shouldn't need to #include <stdbool.h> anywhere now - gen_defs.h should do that automatically/correctly based on the language/version/tool. In C23, stdbool.h isn't even needed for bool/true/false definitions (they're keywords), so we don't bother including stdbool.h in that case. Microsoft didn't define __STDC_VERSION__ in their older tool chains (even though they were C99 compatible and had stdbool.h), so we use a _MSC_VER check to know that there's a stdbool.h we should use in that case. For other/old compilers (e.g. Borland C) we #define bool/true/false following the pattern of stdbool.h (doesn't use a typedef). I didn't convert UIFC yet. This addresses issue #698
-
Rob Swindell authored
-
Deucе authored
TLS clients don't (currently) add a certificate, so there's no need to delete it.
-
Deucе authored
Use cryptDestroySession() instead.
-
Deucе authored
-
Deucе authored
-
Deucе authored
With this, it's not strictly necessary to clear cert_list in ssl_sync() when the certificate changes, but it's still a good idea to prevent unusable memory from being held onto.
-
Rob Swindell authored
warning: value computed is not used
-
Deucе authored
Now each lock has an easily understandable purpose, and covers the lowest possible amount of code.
-
- Jan 19, 2024
-
-
Deucе authored
-
Rob Swindell authored
-
Rob Swindell authored
Use new rwlock for ssl certificate. See merge request !386
-
-
Deucе authored
Instead of tight loops with 1ms Sleep()s in them, add events for zero readers and zero writers that we can wait for instead. Unfortunately, since Events aren't interlocked with a critical section like condition variables are with mutexes in pthreads, we can't rely on this for race-free code, so for read locks, we still may spin under write pressure.
-
Deucе authored
-
Deucе authored
-
- Jan 18, 2024
-
-
Deucе authored
Various bits of broken no longer broken.
-
Deucе authored
-
Deucе authored
Since we can't bool anyway, may as well.
-
Deucе authored
-
Deucе authored
It would be nice to use TLS for the recusrion counter, but on Windows, it looks like TLS in threads created after the object is created is uninitialized, so we would need some kind of thread start hook thingie which just seems like too much work. Instead, rely on the old standby single-linked list to track.
-
Deucе authored
It looks like Windows actually uses the name for matching existing events, so if two events have the same name, they end up being the same object.
-
Deucе authored
-
Deucе authored
-
Deucе authored
-
Deucе authored
-
Deucе authored
-
Deucе authored
-
Deucе authored
-
Deucе authored
-
Deucе authored
-
Deucе authored
-
Deucе authored
-
Deucе authored
Recursive read locks, non-recursive write locks.
-
Deucе authored
Currently the "wrapper" is just the POSIX API. We may not need the pthread_rwlock_timed??lock() functions, and even if we do, we like want a different wrapper that takes a ms timeout instead of an absolute time.
-
Deucе authored
On Win32, the name param is an LPCSTR which apparently is Microsoft talk for const char *. In C we're allowed to do whatever we want, but in C++, this matters more.
-