summaryrefslogtreecommitdiffstats
path: root/include/c11/threads.h
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-10-22 17:38:45 +0200
committerNicolai Hähnle <[email protected]>2017-11-09 11:57:22 +0100
commitf1a364878431c8c5f4fd38b40b9766449e49f552 (patch)
tree6ef17660b1942b4b28e1e7001e96334a11eac7b2 /include/c11/threads.h
parentc50743f61c533fe8bfed0a432ef74fcf6b4cea24 (diff)
threads: update for late C11 changes
C11 threads were changed to use struct timespec instead of xtime, and thrd_sleep got a second argument. See http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1554.htm and http://en.cppreference.com/w/c/thread/{thrd_sleep,cnd_timedwait,mtx_timedlock} Note that cnd_timedwait is spec'd to be relative to TIME_UTC / CLOCK_REALTIME. v2: Fix Windows build errors. Tested with a default Appveyor config that uses Visual Studio 2013. Judging from Brian's email and random internet sources, Visual Studio 2015 does have timespec and timespec_get, hence the _MSC_VER-based guard which I have not tested. Cc: Jose Fonseca <[email protected]> Cc: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]> (v1)
Diffstat (limited to 'include/c11/threads.h')
-rw-r--r--include/c11/threads.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/include/c11/threads.h b/include/c11/threads.h
index 573348d8091..3c3f23a8ab8 100644
--- a/include/c11/threads.h
+++ b/include/c11/threads.h
@@ -30,9 +30,6 @@
#define EMULATED_THREADS_H_INCLUDED_
#include <time.h>
-#ifdef _MSC_VER
-#include <thr/xtimec.h> // for xtime
-#endif
#ifndef TIME_UTC
#define TIME_UTC 1
@@ -44,14 +41,6 @@
typedef void (*tss_dtor_t)(void*);
typedef int (*thrd_start_t)(void*);
-#ifndef _MSC_VER
-struct xtime {
- time_t sec;
- long nsec;
-};
-typedef struct xtime xtime;
-#endif
-
/*-------------------- enumeration constants --------------------*/
enum {