Mstdlib-1.24.0

Functions

int M_thread_poll (struct pollfd fds[], nfds_t nfds, int timeout)
 
M_bool M_thread_sigmask (int how, const sigset_t *set, sigset_t *oldset)
 

Detailed Description

Low level threading functionality. These are only provided due to fundamental and irreconcilable differences that they cannot be provided in a platform agnostic manner.

Function Documentation

◆ 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]fdsArray of FDs to monitor with monitoring flags
[in]nfdsNumber of file descriptors in array.
[in]timeoutHow 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]howHow to change signal behavior. Values are
  • SIG_BLOCK
  • SIG_UNBLOCK
  • SIG_SETMASK
[in]setWhat signals to set using how. Optional, NULL if only getting current signals from oldset.
[in]oldsetPrevious signal status. Optional, NULL if only setting signals.
Returns
M_TRUE on success, otherwise M_FALSE.