Rizin
unix-like reverse engineering framework and cli tools
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Friends Macros Modules Pages
mythread.h File Reference

Some threading related helper macros and functions. More...

#include "sysdefs.h"
#include <signal.h>

Go to the source code of this file.

Macros

#define mythread_once(func)
 

Functions

static void mythread_sigmask (int how, const sigset_t *restrict set, sigset_t *restrict oset)
 

Detailed Description

Some threading related helper macros and functions.

Definition in file mythread.h.

Macro Definition Documentation

◆ mythread_once

#define mythread_once (   func)
Value:
do { \
static bool once_ = false; \
if (!once_) { \
func(); \
once_ = true; \
} \
} while (0)

Definition at line 72 of file mythread.h.

Function Documentation

◆ mythread_sigmask()

static void mythread_sigmask ( int  how,
const sigset_t *restrict  set,
sigset_t *restrict  oset 
)
inlinestatic

Definition at line 87 of file mythread.h.

89 {
90  int ret = sigprocmask(how, set, oset);
91  assert(ret == 0);
92  (void)ret;
93 }
assert(limit<=UINT32_MAX/2)

References assert().

Referenced by signals_block(), and signals_unblock().