File: async.h

package info (click to toggle)
siridb-server 2.0.53-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,612 kB
  • sloc: ansic: 47,501; python: 6,263; sh: 254; makefile: 149
file content (23 lines) | stat: -rw-r--r-- 432 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
 * async.h - SiriDB async wrapper.
 */
#ifndef SIRI_ASYC_H_
#define SIRI_ASYC_H_

typedef struct siri_async_s siri_async_t;

#include <uv.h>
#include <inttypes.h>

void siri_async_close(uv_handle_t * handle);
void siri_async_decref(uv_async_t ** handle);

#define siri_async_incref(HANDLE__) ((siri_async_t *) HANDLE__->data)->ref++

struct siri_async_s
{
    uv_close_cb free_cb;
    uint8_t ref;
};

#endif  /* SIRI_ASYC_H_ */