6 extern unsigned int num_online_cpus
;
11 #define __unused__ __attribute((unused))
13 extern char *progname
;
15 void * alloc_shared(unsigned int size
);
17 void do_main_loop(void);
21 int check_tainted(void);
23 void init_watchdog(void);
24 unsigned int check_if_fd(unsigned int child
);
26 extern unsigned int user_specified_children
;
28 void regenerate(void);
30 #define UNUSED(x) (void)(x)
32 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
34 #define max(x, y) ((x) >= (y) ? (x) : (y))
35 #define min(x, y) ((x) <= (y) ? (x) : (y))
38 # define offsetof(type, member) ((size_t) &((type *) 0)->member)
41 #define MAX_ERRNO 4095
42 #define IS_ERR_VALUE(x) ((x) >= (unsigned long)-MAX_ERRNO)
43 static inline long IS_ERR(unsigned long x
)
45 return IS_ERR_VALUE(x
);
49 #endif /* _TRINITY_H */