Rizin
unix-like reverse engineering framework and cli tools
main.c File Reference
#include <stdio.h>
#include <uv.h>

Go to the source code of this file.

Functions

void gc (uv_timer_t *handle)
 
void fake_job (uv_timer_t *handle)
 
int main ()
 

Variables

uv_loop_tloop
 
uv_timer_t gc_req
 
uv_timer_t fake_job_req
 

Function Documentation

◆ fake_job()

void fake_job ( uv_timer_t handle)

Definition at line 13 of file main.c.

13  {
14  fprintf(stdout, "Fake job done\n");
15 }

Referenced by main().

◆ gc()

void gc ( uv_timer_t handle)

Definition at line 9 of file main.c.

9  {
10  fprintf(stderr, "Freeing unused objects\n");
11 }

Referenced by main().

◆ main()

int main ( void  )

Definition at line 17 of file main.c.

17  {
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 }
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

References fake_job(), fake_job_req, gc(), gc_req, loop, uv_default_loop(), uv_run(), UV_RUN_DEFAULT, uv_timer_init(), uv_timer_start(), and uv_unref().

Variable Documentation

◆ fake_job_req

uv_timer_t fake_job_req

Definition at line 7 of file main.c.

Referenced by main().

◆ gc_req

uv_timer_t gc_req

Definition at line 6 of file main.c.

Referenced by main().

◆ loop

uv_loop_t* loop

Definition at line 5 of file main.c.