Rizin
unix-like reverse engineering framework and cli tools
main.c
Go to the documentation of this file.
1 #include <stdio.h>
2 #include <uv.h>
3 
5 
7  printf("Idle callback\n");
8  counter++;
9 
10  if (counter >= 5) {
12  printf("uv_stop() called\n");
13  }
14 }
15 
17  printf("Prep callback\n");
18 }
19 
20 int main() {
22  uv_prepare_t prep;
23 
26 
28  uv_prepare_start(&prep, prep_cb);
29 
31 
32  return 0;
33 }
static mcore_handle handle
Definition: asm_mcore.c:8
_Use_decl_annotations_ int __cdecl printf(const char *const _Format,...)
Definition: cs_driver.c:93
int main(int argc, const char **argv)
Definition: main.c:340
long int64_t
Definition: sftypes.h:32
Definition: uv.h:834
int64_t counter
Definition: main.c:4
uv_idle_t idler
Definition: main.c:7
void idle_cb(uv_idle_t *handle)
Definition: main.c:6
void prep_cb(uv_prepare_t *handle)
Definition: main.c:16
UV_EXTERN void uv_stop(uv_loop_t *)
Definition: uv-common.c:562
@ UV_RUN_DEFAULT
Definition: uv.h:255
UV_EXTERN int uv_prepare_init(uv_loop_t *, uv_prepare_t *prepare)
UV_EXTERN int uv_prepare_start(uv_prepare_t *prepare, uv_prepare_cb cb)
UV_EXTERN int uv_run(uv_loop_t *, uv_run_mode mode)
Definition: core.c:365
UV_EXTERN uv_loop_t * uv_default_loop(void)
Definition: uv-common.c:763
UV_EXTERN int uv_idle_start(uv_idle_t *idle, uv_idle_cb cb)
UV_EXTERN int uv_idle_init(uv_loop_t *, uv_idle_t *idle)