Skip to content

Commit

Permalink
Define SIZEOF_CLICK_JIFFIES_T.
Browse files Browse the repository at this point in the history
  • Loading branch information
kohler committed Nov 22, 2009
1 parent e02d652 commit 1d2069d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config-bsdmodule.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
/* Define if 'int64_t' is typedefed to 'long long' in bsdmodule. */
#undef HAVE_INT64_IS_LONG_LONG_BSDMODULE

/* The size of a `click_jiffies_t', as computed by sizeof. */
#define SIZEOF_CLICK_JIFFIES_T SIZEOF_INT

/* Include integer and other type definitions. */
#include <sys/types.h>

Expand Down
3 changes: 3 additions & 0 deletions config-linuxmodule.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@
/* Define to 1 if Linux defines the type 'uintptr_t'. */
#undef HAVE_UINTPTR_T_LINUXMODULE

/* The size of a `click_jiffies_t', as computed by sizeof. */
#define SIZEOF_CLICK_JIFFIES_T SIZEOF_LONG

/* Define if fast checksum functions require correct alignment. */
#ifndef __i386__
# define FAST_CHECKSUM_ALIGNED 1
Expand Down
3 changes: 3 additions & 0 deletions config-userlevel.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@
/* Define if you have the vsnprintf function. */
#undef HAVE_VSNPRINTF

/* The size of a `click_jiffies_t', as computed by sizeof. */
#define SIZEOF_CLICK_JIFFIES_T SIZEOF_INT

/* The size of a `off_t', as computed by sizeof. */
#undef SIZEOF_OFF_T

Expand Down
5 changes: 5 additions & 0 deletions include/click/glue.hh
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ typedef long click_jiffies_difference_t;
# define CLICK_JIFFIES_MONOTONIC 1
# define CLICK_HZ HZ
# define click_jiffies_less(a, b) ((click_jiffies_difference_t) ((a) - (b)) < 0)
# define HAS_LONG_CLICK_JIFFIES_T 1
#elif CLICK_BSDMODULE
# define click_gettimeofday(tvp) (getmicrotime(tvp))
typedef int click_jiffies_t;
Expand All @@ -390,6 +391,10 @@ CLICK_ENDDECLS
# define CLICK_HZ 1000
#endif

#if SIZEOF_CLICK_JIFFIES_T != (HAS_LONG_CLICK_JIFFIES_T ? SIZEOF_LONG : SIZEOF_INT)
# error "SIZEOF_CLICK_JIFFIES_T declared incorrectly"
#endif


// TIMEVAL OPERATIONS

Expand Down

0 comments on commit 1d2069d

Please sign in to comment.