signal: introduce a low-level API to specify the particular signal masks to use