-
-function ust_event_generator_toggle_state
-{
- ust_event_generator_suspended=$((ust_event_generator_suspended==0))
-
-}
-function ust_event_generator
-{
- test_app=$1
- state_file=$2
- ust_event_generator_suspended=0
- trap ust_event_generator_toggle_state SIGUSR1
-
- while (true); do
- if [[ $ust_event_generator_suspended -eq "1" ]]; then
- touch $state_file
- sleep 0.5
- else
- if [[ -f $state_file ]]; then
- rm -rf $state_file 2> /dev/null
- fi
- taskset -c 0 $test_app -i $NR_ITER -w $NR_USEC_WAIT > /dev/null 2>&1
- fi
- done
-}