Stylistic pedantry
This commit is contained in:
parent
c55e94e3f4
commit
7208138ffb
3 changed files with 18 additions and 10 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
Prerelease: alpha.1
|
||||
Build Date: 29 June 2020
|
||||
Build Number: 1A48
|
||||
Build Date: 1 July 2020
|
||||
Build Number: 1A49
|
||||
|
|
|
@ -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; };
|
||||
|
|
Loading…
Reference in a new issue