#ifndef _LVE_HOOKS_H_ #define _LVE_HOOKS_H_ #include #include void lve_get_avenrun_trace(unsigned long *loads, unsigned long offset, int shift); /** XXX */ #define PFA_RECURSIVE 30 static inline bool lve_hook_recursive_check_reset(void) { return test_and_clear_bit(PFA_RECURSIVE, ¤t->atomic_flags); } static inline void lve_hook_recursive_set(void) { set_bit(PFA_RECURSIVE, ¤t->atomic_flags); } #define LVE_HOOK_RECURSIVE_CALL(x) \ ({ lve_hook_recursive_set();; \ x; }) int lve_register_hook(char *name, void *func); #endif