mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-09 00:07:13 +00:00
refactor: remove Sleep from winapi_stubs
This commit is contained in:
parent
d9f03fdddf
commit
caf7128d58
|
|
@ -336,17 +336,6 @@ static inline VOID GlobalMemoryStatus(LPMEMORYSTATUS lpBuffer) {
|
|||
|
||||
static inline DWORD GetLastError(VOID) { return errno; }
|
||||
|
||||
static inline VOID Sleep(DWORD dwMilliseconds) {
|
||||
struct timespec ts;
|
||||
ts.tv_nsec = (dwMilliseconds * 1000000) % 1000000000;
|
||||
ts.tv_sec = dwMilliseconds / 1000;
|
||||
|
||||
int ret;
|
||||
do {
|
||||
ret = nanosleep(&ts, &ts);
|
||||
} while (ret == -1 && errno == EINTR);
|
||||
}
|
||||
|
||||
static inline LONG64 InterlockedCompareExchangeRelease64(
|
||||
LONG64 volatile* Destination, LONG64 Exchange, LONG64 Comperand) {
|
||||
LONG64 expected = Comperand;
|
||||
|
|
|
|||
Loading…
Reference in a new issue