The signal_hook crate makes this easy, but unfortunately insists on
hardcoding SA_RESTART. So we have to then use libc directly to patch
that out...
Still worth using signal_hook for the atomic flag helper though.
Signed-off-by: Hector Martin <marcan@marcan.st>
On any panic, we dump out the last ~30 seconds of IVSENSE data along
with the starting state and panic reason.
Also add a feature to panic if the gain reduces too much. This can be
used to try to catch badness.
Signed-off-by: Hector Martin <marcan@marcan.st>
the bindings we rely on were merged in v0.7.1, so we
no longer need to carry the crate downstream.
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>