#include "EXTERN.h" #include "perl.h" #include "XSUB.h" #include "ppport.h" #include "perlglue.h" #define INTERRUPTHANDLE "libvxi11client" extern int vxi11_enable_srq(bool enable, char* handle, void (*callback)(void)); static SV* perlcallback = NULL; static void interruptcallback(void) { //PUSHMARK(SP); call_sv(perlcallback, G_DISCARD | G_NOARGS); } int glue_enable_srq(bool enable, SV* callback) { perlcallback = callback; return vxi11_enable_srq(enable, INTERRUPTHANDLE, interruptcallback); }