]> Pileus Git - ~andy/linux/blob - drivers/staging/ozwpan/ozevent.h
Merge branch 'patches_for_v3.6' into v4l_for_linus
[~andy/linux] / drivers / staging / ozwpan / ozevent.h
1 /* -----------------------------------------------------------------------------
2  * Copyright (c) 2011 Ozmo Inc
3  * Released under the GNU General Public License Version 2 (GPLv2).
4  * -----------------------------------------------------------------------------
5  */
6 #ifndef _OZEVENT_H
7 #define _OZEVENT_H
8 #include "ozconfig.h"
9 #include "ozeventdef.h"
10
11 #ifdef WANT_EVENT_TRACE
12 extern unsigned long g_evt_mask;
13 void oz_event_init(void);
14 void oz_event_term(void);
15 void oz_event_log2(u8 evt, u8 ctx1, u16 ctx2, void *ctx3, unsigned ctx4);
16 #define oz_event_log(__evt, __ctx1, __ctx2, __ctx3, __ctx4) \
17         do { \
18                 if ((1<<(__evt)) & g_evt_mask) \
19                         oz_event_log2(__evt, __ctx1, __ctx2, __ctx3, __ctx4); \
20         } while (0)
21 int oz_events_copy(struct oz_evtlist __user *lst);
22 void oz_events_clear(void);
23 #else
24 #define oz_event_init()
25 #define oz_event_term()
26 #define oz_event_log(__evt, __ctx1, __ctx2, __ctx3, __ctx4)
27 #define oz_events_copy(__lst)
28 #define oz_events_clear()
29 #endif /* WANT_EVENT_TRACE */
30
31 #endif /* _OZEVENT_H */