projects
/
lttv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added period
[lttv.git]
/
ltt
/
branches
/
poly
/
lttv
/
lttv
/
hook.h
diff --git
a/ltt/branches/poly/lttv/lttv/hook.h
b/ltt/branches/poly/lttv/lttv/hook.h
index 7da21346f2c2cd3f82b55e3e658bed53b0ed49f6..197184a6d4ce9333be659c31ecb5a5408b0e0add 100644
(file)
--- a/
ltt/branches/poly/lttv/lttv/hook.h
+++ b/
ltt/branches/poly/lttv/lttv/hook.h
@@
-22,6
+22,7
@@
#define HOOK_H
#include <glib.h>
#define HOOK_H
#include <glib.h>
+#include <ltt/compiler.h>
/* A hook is a function to call with the supplied hook data, and with
call site specific data (e.g., hooks for events are called with a
/* A hook is a function to call with the supplied hook data, and with
call site specific data (e.g., hooks for events are called with a
@@
-122,8
+123,14
@@
gboolean lttv_hooks_call_check_merge(LttvHooks *h1, void *call_data1,
/* Sometimes different hooks need to be called based on the case. The
case is represented by an unsigned integer id */
/* Sometimes different hooks need to be called based on the case. The
case is represented by an unsigned integer id */
-typedef GPtrArray LttvHooksById;
+typedef struct _LttvHooksById {
+ GPtrArray *index;
+ GArray *array;
+} 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 << FACILITIES_BITS) )
/* Create and destroy a hooks by id list */
/* Create and destroy a hooks by id list */
@@
-147,7
+154,7
@@
unsigned lttv_hooks_by_id_max_id(LttvHooksById *h);
static inline LttvHooks *lttv_hooks_by_id_get(LttvHooksById *h, unsigned id)
{
LttvHooks *ret;
static inline LttvHooks *lttv_hooks_by_id_get(LttvHooksById *h, unsigned id)
{
LttvHooks *ret;
- if(likely(id < h->
len)) ret = h
->pdata[id];
+ if(likely(id < h->
index->len)) ret = h->index
->pdata[id];
else ret = NULL;
return ret;
else ret = NULL;
return ret;
This page took
0.022775 seconds
and
4
git commands to generate.