Stylistic pedantry

This commit is contained in:
Graham Nelson 2020-07-01 17:16:46 +01:00
parent c55e94e3f4
commit 7208138ffb
3 changed files with 18 additions and 10 deletions

View file

@ -1,6 +1,6 @@
# Inweb 7
v7-alpha.1+1A48 'Escape to Danger' (29 June 2020)
v7-alpha.1+1A49 'Escape to Danger' (1 July 2020)
## About Inweb

View file

@ -1,3 +1,3 @@
Prerelease: alpha.1
Build Date: 29 June 2020
Build Number: 1A48
Build Date: 1 July 2020
Build Number: 1A49

View file

@ -240,14 +240,22 @@ off_t Platform::size(char *transcoded_filename) {
@h Mutexes.
= (very early code)
struct Win32_Mutex { INIT_ONCE init; CRITICAL_SECTION crit; };
@d CREATE_MUTEX(name)
static struct Win32_Mutex name = { INIT_ONCE_STATIC_INIT, { 0 }};
@d GLOBAL_MUTEX(name)
static struct Win32_Mutex name = { INIT_ONCE_STATIC_INIT, { 0 }};
@d LOCK_MUTEX(name)
{ BOOL pending; InitOnceBeginInitialize(&(name.init),0,&pending,0); if (pending) { InitializeCriticalSection(&(name.crit)); InitOnceComplete(&(name.init),0,0); } EnterCriticalSection(&(name.crit)); }
@d UNLOCK_MUTEX(name)
{ LeaveCriticalSection(&(name.crit)); }
@d LOCK_MUTEX(name) {
BOOL pending;
InitOnceBeginInitialize(&(name.init), 0, &pending, 0);
if (pending) {
InitializeCriticalSection(&(name.crit));
InitOnceComplete(&(name.init), 0, 0);
}
EnterCriticalSection(&(name.crit));
}
@d UNLOCK_MUTEX(name) {
LeaveCriticalSection(&(name.crit));
}
= (very early code)
struct Win32_Mutex { INIT_ONCE init; CRITICAL_SECTION crit; };