Reissued to address poorly formatted git log entry. Otherwise unaltered from v1.
Here is another patch that I've delayed merging for too long. The original discussion was raised at https://lists.debian.org/debian-hurd/2025/06/msg00052.html. As per Samuel's conclusion in the above thread, I have altered the mutex locking for ITIMER_REAL so that _hurd_siglock is always acquired before _hurd_itimer_lock to prevent deadlocks that can occur whilst handling an alarm at the same time a new alarm is being setup. A few comments regarding the patch: 1) I slightly simplified setitimer_locked to move the critical section unlocking to the one place where that needs to happen in __setitimer. The other calls to setitimer_locked don't unlock any critical section here. This also means that the critical section setup in __setitimer can use the more commonly used HURD_CRITICAL_BEGIN/END as these are now in the same scope. 2) setitimer_locked previously unlocked _hurd_itimer_lock. It no longer does that which means the callers unlock that lock in the same scope as the locking which I think aids clarity. Regards, Mike.
