From 934c1316ae47754a2e368c65228c3cbfe552680f Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 22 Dec 2016 15:23:21 -0800 Subject: Inline locks (fewer allocs), simpler absolute times for wakeups. nn_sock_recv. --- src/core/defs.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/core/defs.h') diff --git a/src/core/defs.h b/src/core/defs.h index b294e0f3..a37377f7 100644 --- a/src/core/defs.h +++ b/src/core/defs.h @@ -10,6 +10,8 @@ #ifndef CORE_DEFS_H #define CORE_DEFS_H +#include + // C compilers may get unhappy when named arguments are not used. While // there are things like __attribute__((unused)) which are arguably // superior, support for such are not universal. @@ -32,4 +34,12 @@ typedef struct nni_pipe_ops nni_pipe_ops; typedef struct nni_protocol nni_protocol; +typedef int nni_signal; // Used as a turnstile/wakeup channel. +typedef uint64_t nni_time; // An absolute time in microseconds. +typedef int nni_duration; // A relative time in microseconds. + +// Some default timing things. +#define NNI_TIME_NEVER ((nni_time) 0xffffffffull) +#define NNI_TIME_ZERO ((nni_time) 0) + #endif // CORE_DEFS_H -- cgit v1.2.3-70-g09d2