atomic.cpp: improvements.

Reduced static memory amount for waitable atomics.
Allow notifier to skip notifications if wait/notify masks don't overlap.
Improve raw_notify to wake up the thread by its id, add thread_id arg.
Add optional mask argument to notify_one() and notify_all().
This commit is contained in:
Nekotekina 2020-11-04 17:19:35 +03:00
parent b66628baca
commit 5248240e10
7 changed files with 418 additions and 249 deletions

View file

@ -7,6 +7,7 @@
#include "dynamic_library.h"
#ifdef _WIN32
#define NOMINMAX
#include <Windows.h>
#include <time.h>
#elif __linux__