brian ran into a rare deadlock with futexes where there is a circular wait between the futex spinlock and the alarm spinlock. we can probably fix by not holding the alarm lock while running the handler, and using something similar to what the kernel's alarm code does for RKM alarms. (delicate issue is handling unset_alarm()).
might as well fix up both the kernel and parlib alarm code in this way. might be able to run the user-level alarms in a uthread, though that's a separate issue. (getting a thread from the 2LS, esp the thread0 sched).
brian ran into a rare deadlock with futexes where there is a circular wait between the futex spinlock and the alarm spinlock. we can probably fix by not holding the alarm lock while running the handler, and using something similar to what the kernel's alarm code does for RKM alarms. (delicate issue is handling unset_alarm()).
might as well fix up both the kernel and parlib alarm code in this way. might be able to run the user-level alarms in a uthread, though that's a separate issue. (getting a thread from the 2LS, esp the thread0 sched).