alarm: Clean up condition variable usage