/* This is a small intermediate function that sets/unsets the exception handler before calling the initial thread function */ static void ExcpStartFunc(void* arg) { EXCEPTIONREGISTRATIONRECORD excpreg; PARAMSTORE params, *pParams = arg; PR_OS2_SetFloatExcpHandler(&excpreg); params = *pParams; PR_Free(pParams); params.start(params.thread); PR_OS2_UnsetFloatExcpHandler(&excpreg); }
/* This is a small intermediate function that sets/unsets the exception handler before calling the initial thread function */ static void ExcpStartFunc(void* arg) { // For arrays it's guaranteed that &[0] < &[1] which we use to make sure that the registration // record of the top (last) exception handler has a smaller address (i.e. located lower on the // stack) — this is a requirement of the SEH logic. EXCEPTIONREGISTRATIONRECORD excpreg[2]; PARAMSTORE params, *pParams = arg; LibLoadExceptq(&excpreg[1]); PR_OS2_SetFloatExcpHandler(&excpreg[0]); params = *pParams; PR_Free(pParams); params.start(params.thread); PR_OS2_UnsetFloatExcpHandler(&excpreg[0]); UninstallExceptq(&excpreg[1]); }