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
5
#include <
uv.h
>
6
7
#define FIB_UNTIL 25
8
uv_loop_t
*
loop
;
9
uv_work_t
fib_reqs
[
FIB_UNTIL
];
10
11
long
fib_
(
long
t) {
12
if
(t == 0 || t == 1)
13
return
1;
14
else
15
return
fib_
(t-1) +
fib_
(t-2);
16
}
17
18
void
fib
(
uv_work_t
*
req
) {
19
int
n
= *(
int
*)
req
->data;
20
if
(random() % 2)
21
sleep(1);
22
else
23
sleep(3);
24
long
fib
=
fib_
(
n
);
25
fprintf(stderr,
"%dth fibonacci is %lu\n"
,
n
,
fib
);
26
}
27
28
void
after_fib
(
uv_work_t
*
req
,
int
status
) {
29
if
(
status
== UV_ECANCELED)
30
fprintf(stderr,
"Calculation of %d cancelled.\n"
, *(
int
*)
req
->data);
31
}
32
33
void
signal_handler
(
uv_signal_t
*
req
,
int
signum
)
34
{
35
printf
(
"Signal received!\n"
);
36
int
i
;
37
for
(
i
= 0;
i
<
FIB_UNTIL
;
i
++) {
38
uv_cancel
((
uv_req_t
*) &
fib_reqs
[
i
]);
39
}
40
uv_signal_stop
(
req
);
41
}
42
43
int
main
() {
44
loop
=
uv_default_loop
();
45
46
int
data[
FIB_UNTIL
];
47
int
i
;
48
for
(
i
= 0;
i
<
FIB_UNTIL
;
i
++) {
49
data[
i
] =
i
;
50
fib_reqs
[
i
].data = (
void
*) &data[
i
];
51
uv_queue_work
(
loop
, &
fib_reqs
[
i
],
fib
,
after_fib
);
52
}
53
54
uv_signal_t
sig;
55
uv_signal_init
(
loop
, &sig);
56
uv_signal_start
(&sig,
signal_handler
, SIGINT);
57
58
return
uv_run
(
loop
,
UV_RUN_DEFAULT
);
59
}
i
lzma_index ** i
Definition:
index.h:629
printf
_Use_decl_annotations_ int __cdecl printf(const char *const _Format,...)
Definition:
cs_driver.c:93
req
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec req
Definition:
sflib.h:128
main
int main(int argc, const char **argv)
Definition:
main.c:340
status
static const char struct stat static buf struct stat static buf static vhangup int status
Definition:
sflib.h:145
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
n
int n
Definition:
mipsasm.c:19
uv_loop_s
Definition:
uv.h:1780
uv_req_s
Definition:
uv.h:407
uv_signal_s
Definition:
uv.h:1574
uv_work_s
Definition:
uv.h:1066
loop
uv_loop_t * loop
Definition:
main.c:7
fib_
long fib_(long t)
Definition:
main.c:11
signal_handler
void signal_handler(uv_signal_t *req, int signum)
Definition:
main.c:33
FIB_UNTIL
#define FIB_UNTIL
Definition:
main.c:7
fib_reqs
uv_work_t fib_reqs[FIB_UNTIL]
Definition:
main.c:9
fib
void fib(uv_work_t *req)
Definition:
main.c:18
after_fib
void after_fib(uv_work_t *req, int status)
Definition:
main.c:28
uv.h
UV_RUN_DEFAULT
@ UV_RUN_DEFAULT
Definition:
uv.h:255
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_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_queue_work
UV_EXTERN int uv_queue_work(uv_loop_t *loop, uv_work_t *req, uv_work_cb work_cb, uv_after_work_cb after_work_cb)
Definition:
threadpool.c:338
uv_default_loop
UV_EXTERN uv_loop_t * uv_default_loop(void)
Definition:
uv-common.c:763
uv_cancel
UV_EXTERN int uv_cancel(uv_req_t *req)
Definition:
threadpool.c:358
uv_signal_init
UV_EXTERN int uv_signal_init(uv_loop_t *loop, uv_signal_t *handle)
Definition:
signal.c:319
if
if(dbg->bits==RZ_SYS_BITS_64)
Definition:
windows-arm64.h:4
subprojects
libuv-v1.40.0
docs
code
queue-cancel
main.c
Generated by
1.9.1