Currently, the implementation of Kernel::awaits_signal() and Kernel::pending_signal() share a lot of code, and the implementation in userland of Signal_receiver::block_for_signal() and Signal_receiver::pending_signal() are hard to follow. If Kernel::awaits_signal() would block only, while Kernel::pending_signal() would return a context with its number of signals, both APIs would match much better.
Currently, the implementation of Kernel::awaits_signal() and Kernel::pending_signal() share a lot of code, and the implementation in userland of Signal_receiver::block_for_signal() and Signal_receiver::pending_signal() are hard to follow. If Kernel::awaits_signal() would block only, while Kernel::pending_signal() would return a context with its number of signals, both APIs would match much better.