Page 1 of 1

overflow handler void* context

PostPosted: Mon Jan 30, 2012 5:51 pm
by SDiersen
The description for void *context : context -- a platform dependent structure containing information about the state of the machine when the overflow occurred. This structure is provided for completeness, but can generally be ignored by most users.

I am assuming this is the context switch information; specifically for linux this would be the task_struct structure. I would like to use PAPI in order to gain access to the task_struct structure, but I am unsure how to get the information out of the context parameter.

Any help would be appreciated, even pointing me in the right direction for questions to ask!

Re: overflow handler void* context

PostPosted: Tue Feb 07, 2012 5:50 pm
by vweaver1
It should be enough to cast the context pointer to a ucontext_t and then accessing the fields. None of our tests currently use the context field so I'm not sure how well tested this is.