Click
Loading...
Searching...
No Matches
config-bsdmodule.h
1/* include/click/config-bsdmodule.h. Generated from config-bsdmodule.h.in by configure. */
2/* Process this file with configure to produce config-bsdmodule.h. -*- mode: c -*- */
3#ifndef CLICK_CONFIG_BSDMODULE_H
4#define CLICK_CONFIG_BSDMODULE_H
5
6/* Define stuff under a FreeBSD module. */
7#ifndef __FreeBSD__
8# error "I must be compiled on a FreeBSD machine"
9#endif
10
11/* Define if Click should use an adaptive scheduler to share the CPU(s) more
12 fairly with the kernel. */
13/* #undef HAVE_ADAPTIVE_SCHEDULER */
14
15/* Define if your BSD kernel has polling extensions. */
16/* #undef HAVE_BSD_POLLING */
17
18/* Define if your BSD kernel has Click extensions. */
19/* #undef HAVE_CLICK_BSD_KERNEL */
20
21/* Define if 'int64_t' is typedefed to 'long' in bsdmodule. */
22/* #undef HAVE_INT64_IS_LONG_BSDMODULE */
23
24/* Define if 'int64_t' is typedefed to 'long long' in bsdmodule. */
25/* #undef HAVE_INT64_IS_LONG_LONG_BSDMODULE */
26
27/* Define to enable assertion checking. Failed assertions will print a message
28 and optionally stop the router. */
29/* #undef HAVE_KERNEL_ASSERT */
30
31/* Define if NETISR scheduling should be used. */
32#define BSD_NETISRSCHED 1
33
34/* The size of a `click_jiffies_t', as computed by sizeof. */
35#define SIZEOF_CLICK_JIFFIES_T SIZEOF_INT
36
37/* Include integer and other type definitions. */
38#include <sys/types.h>
39
40/* Define assert macro. */
41# ifdef __cplusplus
42extern "C" {
43# endif
44void click_assert_failed(const char *file, int line, const char *problem_text);
45# ifdef __cplusplus
46}
47# endif
48
49#ifdef HAVE_KERNEL_ASSERT
50# define assert(x) ((x) ? (void)0 : click_assert_failed(__FILE__, __LINE__, #x))
51#else
52# define assert(x) /* nada */
53#endif
54
55/* Define likely and unlikely macros. */
56#define likely(x) __builtin_expect(!!(x), 1)
57#define unlikely(x) __builtin_expect(!!(x), 0)
58
59/* Define HAVE_INT64_IS_LONG based on HAVE_INT64_IS_LONG_BSDMODULE. */
60#ifdef HAVE_INT64_IS_LONG_BSDMODULE
61# define HAVE_INT64_IS_LONG HAVE_INT64_IS_LONG_BSDMODULE
62#endif
63
64/* Define HAVE_INT64_IS_LONG_LONG based on HAVE_INT64_IS_LONG_LONG_BSDMODULE. */
65#if HAVE_LONG_LONG && defined(HAVE_INT64_IS_LONG_LONG_BSDMODULE)
66# define HAVE_INT64_IS_LONG_LONG HAVE_INT64_IS_LONG_LONG_BSDMODULE
67#endif
68
69#ifdef __cplusplus
70
71/* Declare operator new. */
72void *operator new(size_t) throw ();
73void *operator new[](size_t) throw ();
74
75/* Provide placement new. */
76inline void *operator new(size_t, void *v) throw () { return v; }
77#define HAVE_PLACEMENT_NEW 1
78
79/* Define macros that surround Click declarations. */
80#define CLICK_DECLS namespace Click {
81#define CLICK_ENDDECLS }
82#define CLICK_USING_DECLS using namespace Click;
83#define CLICK_NAME(name) ::Click::name
84
85#endif /* __cplusplus */
86
87#endif /* CLICK_CONFIG_BSDMODULE_H */