From: compudj Date: Sun, 21 Aug 2005 04:13:49 +0000 (+0000) Subject: fix GET_HOOK_ID X-Git-Tag: v0.12.20~2450 X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=513eefe0b73ac073c1b9f5682ab786a12196fe56;p=lttv.git fix GET_HOOK_ID git-svn-id: http://ltt.polymtl.ca/svn@1039 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/ltt/ltt.h b/ltt/branches/poly/ltt/ltt.h index 5154c05b..02d937c2 100644 --- a/ltt/branches/poly/ltt/ltt.h +++ b/ltt/branches/poly/ltt/ltt.h @@ -68,6 +68,7 @@ associated to the trace. */ #define NUM_FACILITIES 256 +#define FACILITIES_BITS 8 #define AVG_EVENTS_PER_FACILITIES 10 typedef struct _LttTrace LttTrace; diff --git a/ltt/branches/poly/lttv/lttv/hook.h b/ltt/branches/poly/lttv/lttv/hook.h index 90f50b0d..197184a6 100644 --- a/ltt/branches/poly/lttv/lttv/hook.h +++ b/ltt/branches/poly/lttv/lttv/hook.h @@ -130,7 +130,7 @@ typedef struct _LttvHooksById { /* macro to calculate the hook ID of a facility/event pair. */ #define GET_HOOK_ID(fac_id, ev_id) \ - ( (guint)fac_id | ((guint)ev_id << (8*sizeof(NUM_FACILITIES))) ) + ( (guint)fac_id | ((guint)ev_id << FACILITIES_BITS) ) /* Create and destroy a hooks by id list */