/* * Copyright 2002-2019 Intel Corporation. * * This software is provided to you as Sample Source Code as defined in the accompanying * End User License Agreement for the Intel(R) Software Development Products ("Agreement") * section 1.L. * * This software and the related documents are provided as is, with no express or implied * warranties, other than those that are expressly stated in the License. */ /*! @file * This application tests that a set of synchronous signals (Exceptions) which are raised (sent asynchronously) * are received by the handler that was set for them. * * When 1 is passes as an argument to the application it will also check a different scenarios where some of * these signals are blocked when they are raised */ #include #include #include #include #include #include #include volatile int signalsReceived = 0; // Signal bitwise flag #define ALL_SYNC_SIGNALS ((1< 1) { if ( atoi(argv[1]) == 1) { return CheckBlockedAysncExceptions(); } else { return 1; } } return CheckAysncExceptions(); } void Handler(int signum, siginfo_t *siginfo, void *_uctxt) { signalsReceived |=(1<