14# define thread_local __thread
15#elif __STDC_VERSION__ >= 201112L
16# define thread_local _Thread_local
17#elif defined(_MSC_VER)
21# error Cannot define thread_local
44typedef const char *O2string;
75 size_t chunk_remaining;
108 O2_DBG(printf(
"before o2_hash_node_finish of path_tree:\n"); \
111 full_path_table.finish();
119 printf(
"%s -------- PATH TREE --------\n", o2_debug_prefix);
136extern thread_local O2_context *o2_ctx;
140#include "processes.h"
146void o2_mem_finish(
void);
157#ifndef _CRT_SECURE_NO_WARNINGS
159#define _CRT_SECURE_NO_WARNINGS
167#define snprintf _snprintf
172#define ioctlsocket ioctl
173#define closesocket close
178#define RETURN_IF_ERROR(expr) { O2err err = (expr); \
179 if (err != O2_SUCCESS) return err; }
188 #include "machine/endian.h"
189 #define LITTLE_ENDIAN __DARWIN_LITTLE_ENDIAN
192 #define LITTLE_ENDIAN __LITTLE_ENDIAN
193 #define BYTE_ORDER __BYTE_ORDER
195 #define IS_BIG_ENDIAN (BYTE_ORDER != LITTLE_ENDIAN)
197#define IS_LITTLE_ENDIAN (!(IS_BIG_ENDIAN))
198#define swap16(i) ((((i) >> 8) & 0xff) | (((i) & 0xff) << 8))
199#define swap32(i) ((((i) >> 24) & 0xff) | (((i) & 0xff0000) >> 8) | \
200 (((i) & 0xff00) << 8) | (((i) & 0xff) << 24))
201#define swap64(i) ((((uint64_t) swap32(i)) << 32) | swap32((i) >> 32))
202#define O2_DEF_TYPE_SIZE 8
203#define O2_DEF_DATA_SIZE 8
205#define ROUNDUP_TO_32BIT(i) ((((size_t) i) + 3) & ~3)
214#define o2_strcpy(d, s, n) ((void) strlcpy(d, s, n))
216void o2_strcpy(
char *__restrict dst,
const char *__restrict src,
220extern O2time o2_local_now;
221extern O2time o2_global_now;
222extern O2time o2_global_offset;
223extern int o2_gtsched_started;
225#define O2_ARGS_END O2_MARKER_A, O2_MARKER_B
227#define MAX_BUFFER 1024
231#define O2_MAX_NODE_NAME_LEN 1020
232#define NAME_BUF_LEN ((O2_MAX_NODE_NAME_LEN) + 4)
236#define O2_MAX_MSG_SIZE 32768
240void o2_notify_others(
const char *service_name,
bool added,
const char *tappee,
241 const char *properties,
int send_mode);
245 const char *tapper, O2tap_send_mode send_mode);
250void o2_init_phase2();
252int o2_parse_version(
const char *vers,
int vers_len);
Definition: processes.h:20
void o2_message_drop_warning(const char *warn, o2_msg_data_ptr msg)
Default dropped message alert.
Definition: o2.cpp:1242
double O2time
O2 timestamps are doubles representing seconds since the approximate start time of the ensemble.
Definition: o2.h:625
O2err
return values used generally by O2 functions
Definition: o2.h:329
an O2 message container
Definition: o2.h:690
data part of an O2 message
Definition: o2.h:638
union of all O2 parameter types
Definition: o2.h:764