signal: correctly deliver signal to current_process.
It may happen that a process needs to send a signal to itself to
synchronize on an asynchronous event, e.g., an event triggered by an
interrupt.
In such case we must correctly clear the proc->sig_wait mask.
This fix also improves the signal delivery's performance, because we
don't need to check anymore if we need to skip the delivery to
current_process.
NOTE: we can replace this check with an ASSERT(), if proc->sig_wait is
set the current process can't actively deliver a signal to itself
(it's in sleep state waiting for a signal and can't run by definition).
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3890
38d2e660-2303-0410-9eaa-
f027e97ec537