Rizin
unix-like reverse engineering framework and cli tools
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
v
w
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Enumerations
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Enumerator
b
d
e
h
i
k
n
p
r
s
w
Properties
Events
Related Functions
Files
File List
File Members
All
$
.
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
.
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
▼
Rizin
Clone the Rizin project and keep it updated
Contributor Covenant Code of Conduct
How to report issues
DEVELOPERS
README
AVR (arduino, atmega128, ..)
Brainfuck support for rizin
Calling Conventions profiles
Cross-compilation
Rizin Debugger Internals
Conditional breakpoints
ESIL
FLIRT
Connecting rizin with gdb
What is GProbe?
Packaging
RAP protocol
Release process
RzIL
Command parsing and command handling
SIOL - Simple IO Layer
WinDBG
Install Rizin
README
SDB (string database)
Security Policy
README
Capstone Engine
COMPILE
Xcode Project for Capstone
Rizin libdemangle
cabextract
CONTRIBUTING
Project Maintainers
README
Supported platforms
libzip API changes
INSTALL
NEWS
README
Security Policy
Before next release
Projects for various integrated development environments (IDE)
gen_manual - a program for automatic generation of manual from source code
Meson build system for lz4
Snap Packaging
LZ4 Block Format Description
LZ4 Frame Format Description
LZ4 Streaming API Example : Double Buffer
LZ4 Streaming API Example : Line by Line Text Compression
LZ4 API Example : Dictionary Random Access
LZ4 examples
LZ4 Streaming API Basics
LZ4 Windows binary package
LZ4 - Library Files
lz4(1) – lz4, unlz4, lz4cat - Compress or decompress .lz4 files
Command Line Interface for LZ4 library
LZ4 - Extremely fast compression
Programs and scripts for automated testing of LZ4
LICENSE
ptrace-wrap
rizin-shell-parser
spp
<tt>tree-sitter-config</tt>
<tt>tree-sitter-loader</tt>
Tree-sitter CLI
CONTRIBUTING\ilineb
index\ilineb
section-2-using-parsers\ilineb
section-3-creating-parsers\ilineb
section-4-syntax-highlighting\ilineb
section-5-implementation\ilineb
section-6-contributing\ilineb
section-8-code-navigation-systems\ilineb
<tt>tree-sitter-highlight</tt>
Rust Tree-sitter
Web Tree-sitter
Subdirectories
ICU Parts
tree-sitter
<tt>tree-sitter-tags</tt>
tree-sitter-c
tree-sitter-c
xxHash - Extremely fast hash algorithm
Todo List
►
Modules
►
Namespaces
►
Classes
▼
Files
►
File List
►
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Events
Friends
Macros
Modules
Pages
main.c
Go to the documentation of this file.
1
#include <stdio.h>
2
#include <stdlib.h>
3
#include <unistd.h>
4
#include <
uv.h
>
5
6
uv_loop_t
*
create_loop
()
7
{
8
uv_loop_t
*
loop
=
malloc
(
sizeof
(
uv_loop_t
));
9
if
(
loop
) {
10
uv_loop_init
(
loop
);
11
}
12
return
loop
;
13
}
14
15
void
signal_handler
(
uv_signal_t
*
handle
,
int
signum
)
16
{
17
printf
(
"Signal received: %d\n"
,
signum
);
18
uv_signal_stop
(
handle
);
19
}
20
21
// two signal handlers in one loop
22
void
thread1_worker
(
void
*userp)
23
{
24
uv_loop_t
*loop1 =
create_loop
();
25
26
uv_signal_t
sig1a, sig1b;
27
uv_signal_init
(loop1, &sig1a);
28
uv_signal_start
(&sig1a,
signal_handler
, SIGUSR1);
29
30
uv_signal_init
(loop1, &sig1b);
31
uv_signal_start
(&sig1b,
signal_handler
, SIGUSR1);
32
33
uv_run
(loop1,
UV_RUN_DEFAULT
);
34
}
35
36
// two signal handlers, each in its own loop
37
void
thread2_worker
(
void
*userp)
38
{
39
uv_loop_t
*loop2 =
create_loop
();
40
uv_loop_t
*loop3 =
create_loop
();
41
42
uv_signal_t
sig2;
43
uv_signal_init
(loop2, &sig2);
44
uv_signal_start
(&sig2,
signal_handler
, SIGUSR1);
45
46
uv_signal_t
sig3;
47
uv_signal_init
(loop3, &sig3);
48
uv_signal_start
(&sig3,
signal_handler
, SIGUSR1);
49
50
while
(
uv_run
(loop2,
UV_RUN_NOWAIT
) ||
uv_run
(loop3,
UV_RUN_NOWAIT
)) {
51
}
52
}
53
54
int
main
()
55
{
56
printf
(
"PID %d\n"
, getpid());
57
58
uv_thread_t
thread1, thread2;
59
60
uv_thread_create
(&thread1,
thread1_worker
, 0);
61
uv_thread_create
(&thread2,
thread2_worker
, 0);
62
63
uv_thread_join
(&thread1);
64
uv_thread_join
(&thread2);
65
return
0;
66
}
handle
static mcore_handle handle
Definition:
asm_mcore.c:8
printf
_Use_decl_annotations_ int __cdecl printf(const char *const _Format,...)
Definition:
cs_driver.c:93
main
int main(int argc, const char **argv)
Definition:
main.c:340
malloc
void * malloc(size_t size)
Definition:
malloc.c:123
signum
static static fork const void static count static fd const char static mode const char static pathname const char static path const char static dev const char static group static getpid static getuid void void static data static pause const char static mode static sync const char const char static newpath const char static pathname unsigned long static filedes void static end_data_segment signum
Definition:
sflib.h:79
uv_loop_s
Definition:
uv.h:1780
uv_signal_s
Definition:
uv.h:1574
loop
uv_loop_t * loop
Definition:
main.c:7
signal_handler
void signal_handler(uv_signal_t *req, int signum)
Definition:
main.c:33
thread2_worker
void thread2_worker(void *userp)
Definition:
main.c:37
create_loop
uv_loop_t * create_loop()
Definition:
main.c:6
thread1_worker
void thread1_worker(void *userp)
Definition:
main.c:22
uv_thread_t
pthread_t uv_thread_t
Definition:
unix.h:136
uv.h
UV_RUN_NOWAIT
@ UV_RUN_NOWAIT
Definition:
uv.h:257
UV_RUN_DEFAULT
@ UV_RUN_DEFAULT
Definition:
uv.h:255
uv_thread_join
UV_EXTERN int uv_thread_join(uv_thread_t *tid)
Definition:
thread.c:272
uv_signal_start
UV_EXTERN int uv_signal_start(uv_signal_t *handle, uv_signal_cb signal_cb, int signum)
Definition:
signal.c:340
uv_loop_init
UV_EXTERN int uv_loop_init(uv_loop_t *loop)
Definition:
loop.c:30
uv_run
UV_EXTERN int uv_run(uv_loop_t *, uv_run_mode mode)
Definition:
core.c:365
uv_signal_stop
UV_EXTERN int uv_signal_stop(uv_signal_t *handle)
Definition:
signal.c:513
uv_thread_create
UV_EXTERN int uv_thread_create(uv_thread_t *tid, uv_thread_cb entry, void *arg)
Definition:
thread.c:210
uv_signal_init
UV_EXTERN int uv_signal_init(uv_loop_t *loop, uv_signal_t *handle)
Definition:
signal.c:319
subprojects
libuv-v1.40.0
docs
code
signal
main.c
Generated by
1.9.1