xref: /third_party/libuv/docs/code/helloworld/main.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/libuv/docs/code/helloworld/
1e66f31c5Sopenharmony_ci#include <stdio.h>
2e66f31c5Sopenharmony_ci#include <stdlib.h>
3e66f31c5Sopenharmony_ci#include <uv.h>
4e66f31c5Sopenharmony_ci
5e66f31c5Sopenharmony_ciint main() {
6e66f31c5Sopenharmony_ci    uv_loop_t *loop = malloc(sizeof(uv_loop_t));
7e66f31c5Sopenharmony_ci    uv_loop_init(loop);
8e66f31c5Sopenharmony_ci
9e66f31c5Sopenharmony_ci    printf("Now quitting.\n");
10e66f31c5Sopenharmony_ci    uv_run(loop, UV_RUN_DEFAULT);
11e66f31c5Sopenharmony_ci
12e66f31c5Sopenharmony_ci    uv_loop_close(loop);
13e66f31c5Sopenharmony_ci    free(loop);
14e66f31c5Sopenharmony_ci    return 0;
15e66f31c5Sopenharmony_ci}
16

Indexes created Thu Nov 07 10:32:03 CST 2024