#ifndef _LINUX_ICS_H_ #define _LINUX_ICS_H_ #include #include #define MAX_ICS_NESTING 16 struct ics_descriptor { /* ICS id, only read by kernel */ int id; /* rollback program counter, only read by kernel */ void* pc; /* rollback stack pointer, not used by kernel */ void* sp; /* retry flag, not used by kernel */ int* retry; }; /* ICS control block */ struct ics_cb { /* Points to the top-most valid entry. * -1 indicates an empty stack. * Read and written by kernel. */ int top; struct ics_descriptor ics_stack[MAX_ICS_NESTING]; }; /* get rollback addr for current task */ void* get_rollback_addr(void); #define ICS_DBG(x, args...) printk(x, ## args) #endif