and yes. you can get follow up alarm on alarm(0); when the alarm had already triggered. this is unavoidable. say, the alarm could'v posted the note just before you called alarm(0); as well, but the note was not delivered yet. once the alarm() syscall returns to userspace, it would pickup the posted note and call the note handler.
-- cinap