Low level threading functionality. These are only provided due to fundamental and irreconcilable differences that they cannot be provided in a platform agnostic manner.
◆ M_thread_poll()
int M_thread_poll |
( |
struct pollfd |
fds[], |
|
|
nfds_t |
nfds, |
|
|
int |
timeout |
|
) |
| |
Monitor a file descriptor waiting for it to become ready for I/O operations.
- Parameters
-
[in] | fds | Array of FDs to monitor with monitoring flags |
[in] | nfds | Number of file descriptors in array. |
[in] | timeout | How long to wait before giving up in ms. -1 = infinite |
- Returns
- The number of ready fds, 0 if timeout, -1 on error.
◆ M_thread_sigmask()
M_bool M_thread_sigmask |
( |
int |
how, |
|
|
const sigset_t * |
set, |
|
|
sigset_t * |
oldset |
|
) |
| |
Examine and change blocked signals.
- Parameters
-
[in] | how | How to change signal behavior. Values are
- SIG_BLOCK
- SIG_UNBLOCK
- SIG_SETMASK
|
[in] | set | What signals to set using how. Optional, NULL if only getting current signals from oldset. |
[in] | oldset | Previous signal status. Optional, NULL if only setting signals. |
- Returns
- M_TRUE on success, otherwise M_FALSE.