mr_sigrecv - receive a signal
#include <mrendez.h>
The mr_sigrecv() primitive is used to receive signals from threads or ISRs. A signal can be sent to the calling thread via the mr_sigpost() primitive.
The sigmask implements a selective accept mechanism. The argument is a 32 bit mask indicating which signals the thread is willing to accept. The signals are numbered 0 through 31. To accept signal n, bit (1 << n ) must be set in the sigmask. All threads can accept all 32 signals and a call to mr_init() is not required.
The signal received is returned.