> -----Original Message-----
> From: Mukilan Thiyagarajan (QUIC) <[email protected]>
> Sent: Tuesday, December 27, 2022 9:35 AM
> To: [email protected]; Taylor Simpson <[email protected]>;
> [email protected]
> Cc: Brian Cain <[email protected]>; [email protected];
> [email protected]; Mukilan Thiyagarajan (QUIC)
> <[email protected]>
> Subject: [PATCH 1/2] linux-user/hexagon: fix signal context save & restore
>
> diff --git a/tests/tcg/hexagon/signal_context.c
> b/tests/tcg/hexagon/signal_context.c
> new file mode 100644
> index 0000000000..297e6915a4
> --- /dev/null
> +++ b/tests/tcg/hexagon/signal_context.c
> @@ -0,0 +1,84 @@
> +/*
> + * Copyright(c) 2019-2022 Qualcomm Innovation Center, Inc. All Rights
Since this is a new file, only list 2022 (not 2019-2022).
> +void sig_user(int sig, siginfo_t *info, void *puc) {
> + asm("r7 = #0\n\t"
> + "p0 = r7\n\t"
> + "p1 = r7\n\t"
> + "p2 = r7\n\t"
> + "p3 = r7\n\t"
> + : : : "r7", "p0", "p1", "p2", "p3"); }
Put the curly on the next line.
> +
> +int main()
> +{
> +
> + struct sigaction act;
> + struct itimerspec it;
> + timer_t tid;
> + struct sigevent sev;
> + act.sa_sigaction = sig_user;
> + sigemptyset(&act.sa_mask);
> + act.sa_flags = SA_SIGINFO;
> + sigaction(SIGUSR1, &act, NULL);
> + sev.sigev_notify = SIGEV_SIGNAL;
> + sev.sigev_signo = SIGUSR1;
> + sev.sigev_value.sival_ptr = &tid;
> + timer_create(CLOCK_REALTIME, &sev, &tid);
> + it.it_interval.tv_sec = 0;
> + it.it_interval.tv_nsec = 100000;
> + it.it_value.tv_sec = 0;
> + it.it_value.tv_nsec = 100000;
> + timer_settime(tid, 0, &it, NULL);
> +
> + int err = 0;
> + unsigned int i = 100000;
Put these declarations at the beginning of the function before any code
> + return err;
Before return err, do puts(err ? "FAIL" : "PASS");
Otherwise
Reviewed-by: Taylor Simpson <[email protected]>