From 513eefe0b73ac073c1b9f5682ab786a12196fe56 Mon Sep 17 00:00:00 2001 From: compudj Date: Sun, 21 Aug 2005 04:13:49 +0000 Subject: [PATCH] fix GET_HOOK_ID git-svn-id: http://ltt.polymtl.ca/svn@1039 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/ltt/ltt.h | 1 + ltt/branches/poly/lttv/lttv/hook.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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 */ -- 2.34.1