To get current context I find caller_cx function in perlapi. But there is no description for structure. In perl source code perl.h I can find only this typedef:
typedef struct context PERL_CONTEXT;
Is there examples how to use this struct returned by caller_cx to find current package from XS?