Rizin
unix-like reverse engineering framework and cli tools
main.c
Go to the documentation of this file.
1 #include <stdio.h>
2 
3 #include <uv.h>
4 
8 
10  fprintf(stderr, "Freeing unused objects\n");
11 }
12 
14  fprintf(stdout, "Fake job done\n");
15 }
16 
17 int main() {
19 
22 
23  uv_timer_start(&gc_req, gc, 0, 2000);
24 
25  // could actually be a TCP download or something
28  return uv_run(loop, UV_RUN_DEFAULT);
29 }
static mcore_handle handle
Definition: asm_mcore.c:8
int main(int argc, const char **argv)
Definition: main.c:340
Definition: uv.h:1780
Definition: uv.h:860
uv_loop_t * loop
Definition: main.c:7
uv_timer_t fake_job_req
Definition: main.c:7
uv_timer_t gc_req
Definition: main.c:6
void gc(uv_timer_t *handle)
Definition: main.c:9
void fake_job(uv_timer_t *handle)
Definition: main.c:13
@ UV_RUN_DEFAULT
Definition: uv.h:255
UV_EXTERN int uv_timer_start(uv_timer_t *handle, uv_timer_cb cb, uint64_t timeout, uint64_t repeat)
Definition: timer.c:66
UV_EXTERN int uv_timer_init(uv_loop_t *, uv_timer_t *handle)
Definition: timer.c:58
UV_EXTERN int uv_run(uv_loop_t *, uv_run_mode mode)
Definition: core.c:365
UV_EXTERN void uv_unref(uv_handle_t *)
Definition: uv-common.c:552
UV_EXTERN uv_loop_t * uv_default_loop(void)
Definition: uv-common.c:763