if (!value) { \
static const NAME##_type initial_value = __VA_ARGS__; \
\
- value = xmalloc(sizeof *value); \
+ value = malloc(sizeof *value); \
+ if (value == NULL) { \
+ out_of_memory(); \
+ } \
*value = initial_value; \
xpthread_setspecific(NAME##_key, value); \
} \
if (!value) { \
static const NAME##_type initial_value = __VA_ARGS__; \
\
- value = xmalloc(sizeof *value); \
+ value = malloc(sizeof *value); \
+ if (value == NULL) { \
+ out_of_memory(); \
+ } \
*value = initial_value; \
xpthread_setspecific(NAME##_key, value); \
} \
\f
/* Useful functions related to threading. */
-unsigned int count_cpu_cores(void);
+int count_cpu_cores(void);
#endif /* ovs-thread.h */