p2  0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
aio.c File Reference

asynch event-driven non-blocking IO, via libuv, on files, network streams, processes. More...

#include <stdio.h>
#include <stdlib.h>
#include <uv.h>
#include "potion.h"
+ Include dependency graph for aio.c:

Go to the source code of this file.

Macros

#define DEF_AIO_CB_WRAP(T)   DEF_AIO_CB_WRAP1(T,T,T)
 
#define DEF_AIO_CB_WRAP1(T, H, C)
 
#define DEF_AIO_HANDLE_WRAP(T)
 
#define DEF_AIO_NEW(T)
 
#define DEF_AIO_NEW_LOOP(T)
 
#define DEF_AIO_NEW_LOOP_INIT(T)
 
#define AIO_CB_SET(T, ARG)
 
#define AIO_CB_SET_CAST(T, ARG)
 
#define CHECK_AIO_TYPE(self, T)   if (!potion_bind(P, self, PN_STR("Aio_"_XSTR(T)))) return potion_type_error_want(P, "self", self, ""_XSTR(T))
 
#define CHECK_AIO_STREAM(stream)
 
#define FATAL_AIO_TYPE(self, T)
 
#define FATAL_AIO_STREAM(stream)
 
#define AIO_DATA(T, ARG)
 
#define AIO_STREAM(ARG)
 
#define DEF_AIO_CB(T)
 
#define DEF_AIO_CB_NOSTATUS(T)
 
#define DEF_AIO__VT(T, paren)
 
#define DEF_AIO_CTOR(T)   potion_type_constructor_is(aio_##T##_vt, PN_FUNC(aio_##T##_new, 0));
 
#define DEF_AIO_VT(T, paren)
 
#define DEF_AIO_GLOBAL_VT(T, paren, args)
 
#define DEF_AIO_NUM_GLOBAL(name)   potion_define_global(P, PN_STR("AIO_"_XSTR(name)), PN_NUM(UV_##name))
 

Typedefs

typedef uv_buf_t aio_buf_t
 

Functions

 DEF_AIO_CB_WRAP (write)
 
 DEF_AIO_CB_WRAP (connect)
 
 DEF_AIO_CB_WRAP (shutdown)
 
 DEF_AIO_CB_WRAP1 (connection, stream, connection)
 
 DEF_AIO_CB_WRAP1 (close, handle, close)
 
 DEF_AIO_CB_WRAP (timer)
 
 DEF_AIO_CB_WRAP (async)
 
 DEF_AIO_CB_WRAP (prepare)
 
 DEF_AIO_CB_WRAP (check)
 
 DEF_AIO_CB_WRAP (idle)
 
 DEF_AIO_CB_WRAP1 (exit, process, exit)
 
 DEF_AIO_CB_WRAP1 (walk, handle, walk)
 
 DEF_AIO_CB_WRAP (fs)
 
 DEF_AIO_CB_WRAP (fs_poll)
 
 DEF_AIO_CB_WRAP (fs_event)
 
 DEF_AIO_HANDLE_WRAP (process)
 
 DEF_AIO_CB_WRAP (work)
 
 DEF_AIO_CB_WRAP1 (after_work, work, after_work)
 
 DEF_AIO_CB_WRAP (getaddrinfo)
 
 DEF_AIO_CB_WRAP (signal)
 
 DEF_AIO_HANDLE_WRAP (handle)
 
 DEF_AIO_HANDLE_WRAP (loop)
 
 DEF_AIO_CB_WRAP (pipe)
 
 DEF_AIO_HANDLE_WRAP (stdio_container)
 
 DEF_AIO_HANDLE_WRAP (process_options)
 
 DEF_AIO_CB_WRAP1 (stream, stream, read)
 
 DEF_AIO_HANDLE_WRAP (tty)
 
 DEF_AIO_CB_WRAP (req)
 
 DEF_AIO_CB_WRAP1 (tcp, tcp, read)
 
 DEF_AIO_CB_WRAP1 (udp, udp, udp_recv)
 
 DEF_AIO_CB_WRAP (udp_send)
 
 DEF_AIO_HANDLE_WRAP (cpu_info)
 
 DEF_AIO_HANDLE_WRAP (interface_address)
 
 DEF_AIO_HANDLE_WRAP (sem)
 
 DEF_AIO_HANDLE_WRAP (barrier)
 
 DEF_AIO_HANDLE_WRAP (cond)
 
 DEF_AIO_HANDLE_WRAP (mutex)
 
 DEF_AIO_HANDLE_WRAP (rwlock)
 
static PN aio_error (Potion *P, char *name, int status)
 
static void aio_getaddrinfo_cb (uv_getaddrinfo_t *req, int status, struct addrinfo *res)
 
static PN aio_tcp_new (Potion *P, PN cl, PN self, PN loop)
 
static PN aio_udp_new (Potion *P, PN cl, PN self, PN loop)
 
static PN aio_prepare_new (Potion *P, PN cl, PN self, PN loop)
 
static PN aio_check_new (Potion *P, PN cl, PN self, PN loop)
 
static PN aio_idle_new (Potion *P, PN cl, PN self, PN loop)
 
static PN aio_timer_new (Potion *P, PN cl, PN self, PN loop)
 
static PN aio_signal_new (Potion *P, PN cl, PN self, PN loop)
 
static PN aio_loop_new (Potion *P, PN cl, PN self)
 
static PN aio_handle_new (Potion *P, PN cl, PN self)
 
static PN aio_stream_new (Potion *P, PN cl, PN self)
 
static PN aio_req_new (Potion *P, PN cl, PN self)
 
static PN aio_connect_new (Potion *P, PN cl, PN self)
 
static PN aio_write_new (Potion *P, PN cl, PN self)
 
static PN aio_shutdown_new (Potion *P, PN cl, PN self)
 
static PN aio_udp_send_new (Potion *P, PN cl, PN self)
 
static PN aio_fs_poll_new (Potion *P, PN cl, PN self, PN loop)
 
static PN aio_fs_new (Potion *P, PN cl, PN self)
 
static PN aio_fs_event_new (Potion *P, PN cl, PN self, PN loop)
 
static PN aio_process_options (Potion *P, PN cl, PN self)
 
static PN aio_work_new (Potion *P, PN cl, PN self)
 
static PN aio_getaddrinfo_new (Potion *P, PN cl, PN self, PN cb, PN node, PN service, PN hints, PN loop)
 
static PN aio_cpu_info_new (Potion *P, PN cl, PN self)
 
static PN aio_interface_address_new (Potion *P, PN cl, PN self)
 
static PN aio_tty_new (Potion *P, PN cl, PN self, PN file, PN readable, PN loop)
 
static PN aio_pipe_new (Potion *P, PN cl, PN self, PN ipc, PN loop)
 
static PN aio_barrier_new (Potion *P, PN cl, PN self, PN count)
 
static PN aio_sem_new (Potion *P, PN cl, PN self, PN value)
 
static void aio_async_cb (uv_async_t *req)
 
static PN aio_async_new (Potion *P, PN cl, PN self, PN cb, PN loop)
 
static PN aio_cond_new (Potion *P, PN cl, PN self)
 
static PN aio_mutex_new (Potion *P, PN cl, PN self)
 
static PN aio_rwlock_new (Potion *P, PN cl, PN self)
 
static void aio_write_cb (uv_write_t *req, int status)
 
static void aio_connect_cb (uv_connect_t *req, int status)
 
static void aio_shutdown_cb (uv_shutdown_t *req, int status)
 
static void aio_prepare_cb (uv_prepare_t *req)
 
static void aio_check_cb (uv_check_t *req)
 
static void aio_connection_cb (uv_stream_t *req, int status)
 
static void aio_udp_send_cb (uv_udp_send_t *req, int status)
 
static void aio_idle_cb (uv_idle_t *req)
 
static void aio_timer_cb (uv_timer_t *req)
 
static void aio_signal_cb (uv_signal_t *req, int status)
 
static void aio_fs_cb (uv_fs_t *req)
 
static void aio_read_cb (uv_stream_t *stream, ssize_t nread, const uv_buf_t *buf)
 
static void aio_walk_cb (uv_handle_t *handle, void *arg)
 
static void aio_close_cb (uv_handle_t *handle)
 
static PN aio_size (Potion *P, PN cl, PN self)
 
static void aio_alloc_cb (uv_handle_t *handle, size_t suggested_size, uv_buf_t *buf)
 
static PN aio_check_stop (Potion *P, PN cl, PN self)
 
static PN aio_spawn (Potion *P, PN cl, PN self, PN options, PN loop)
 
DLLEXPORT void Potion_Init_aio (Potion *P)
 

Variables

PNType aio_type
 
PNType aio_tcp_type
 
PNType aio_udp_type
 
PNType aio_loop_type
 
PNType aio_tty_type
 
PNType aio_pipe_type
 
PNType aio_prepare_type
 
PNType aio_idle_type
 
PNType aio_async_type
 
PNType aio_timer_type
 
PNType aio_fs_poll_type
 
PNType aio_signal_type
 
PNType aio_fs_event_type
 
PNType aio_mutex_type
 
PNType aio_rwlock_type
 
PNType aio_sem_type
 
PNType aio_cond_type
 
PNType aio_barrier_type
 
PNType aio_check_type
 
PNType aio_handle_type
 
PNType aio_process_options_type
 
PNType aio_process_type
 
PNType aio_stream_type
 
PNType aio_req_type
 
PNType aio_connect_type
 
PNType aio_write_type
 
PNType aio_shutdown_type
 
PNType aio_udp_send_type
 
PNType aio_fs_type
 
PNType aio_work_type
 
PNType aio_getaddrinfo_type
 
PNType aio_cpu_info_type
 
PNType aio_interface_address_type
 

Detailed Description

asynch event-driven non-blocking IO, via libuv, on files, network streams, processes.

Definition in file aio.c.

Macro Definition Documentation

#define DEF_AIO_CB_WRAP (   T)    DEF_AIO_CB_WRAP1(T,T,T)

Definition at line 30 of file aio.c.

#define DEF_AIO_CB_WRAP1 (   T,
  H,
 
)
Value:
typedef struct aio_##T##_s aio_##T##_t; \
struct aio_##T##_s { \
struct uv_##H##_s r; \
Potion *P; \
struct PNClosure *cb; \
}
a closure is an anonymous function, without closed values,
Definition: potion.h:381
struct Potion_State Potion
Definition: potion.h:80

Definition at line 32 of file aio.c.

#define DEF_AIO_HANDLE_WRAP (   T)
Value:
typedef struct aio_##T##_s aio_##T##_t; \
struct aio_##T##_s { \
uv_##T##_t h; \
Potion *P; \
struct PNClosure *cb; \
}
a closure is an anonymous function, without closed values,
Definition: potion.h:381
struct Potion_State Potion
Definition: potion.h:80

Definition at line 40 of file aio.c.

#define DEF_AIO_NEW (   T)
Value:
uv_##T##_t *handle; \
struct PNData * volatile data = potion_data_alloc(P, sizeof(aio_##T##_t)); \
data->vt = aio_##T##_type; \
handle = (uv_##T##_t*)PN_DATA(data); \
((aio_##T##_t*)handle)->P = P
struct to wrap arbitrary data that we may want to allocate from Potion.
Definition: potion.h:326
static struct PNData * potion_data_alloc(Potion *P, int siz)
Definition: potion.h:765
#define PN_DATA(x)
Definition: potion.h:230

Definition at line 115 of file aio.c.

#define DEF_AIO_NEW_LOOP (   T)
Value:
uv_loop_t* l; \
if (!loop) l = uv_default_loop(); \
else if (PN_VTYPE(loop) == aio_loop_type) \
l = (uv_loop_t*)PN_DATA(loop); \
else return potion_type_error(P, loop);
PNType aio_loop_type
Definition: aio.c:23
#define DEF_AIO_NEW(T)
Definition: aio.c:115
PN potion_type_error(Potion *P, PN obj)
Definition: internal.c:273
#define PN_VTYPE(x)
Definition: potion.h:134
#define PN_DATA(x)
Definition: potion.h:230

Definition at line 121 of file aio.c.

#define DEF_AIO_NEW_LOOP_INIT (   T)
Value:
int r = uv_##T##_init(l, handle); \
return r ? aio_error(P, "Aio_"_XSTR(T), r) : (PN)data;
#define _XSTR(s)
Definition: potion.h:61
static PN aio_error(Potion *P, char *name, int status)
Definition: aio.c:110
#define DEF_AIO_NEW_LOOP(T)
Definition: aio.c:121
volatile _PN PN
Definition: potion.h:81

Definition at line 128 of file aio.c.

#define AIO_CB_SET (   T,
  ARG 
)
Value:
uv_##T##_cb T##_cb; \
if (PN_IS_CLOSURE(cb)) { \
(ARG)->cb = PN_CLOSURE(cb); \
T##_cb = aio_##T##_cb; \
} \
else if (PN_IS_FFIPTR(cb)) \
T##_cb = (uv_##T##_cb)cb; \
else T##_cb = aio_##T##_cb
#define PN_CLOSURE(x)
Definition: potion.h:225
#define PN_IS_FFIPTR(p)
Definition: potion.h:181
#define PN_IS_CLOSURE(v)
Definition: potion.h:177

Definition at line 132 of file aio.c.

#define AIO_CB_SET_CAST (   T,
  ARG 
)
Value:
uv_##T##_cb T##_cb; \
if (PN_IS_CLOSURE(cb)) { \
((aio_##T##_t*)ARG)->cb = PN_CLOSURE(cb); \
T##_cb = aio_##T##_cb; \
} \
else if (PN_IS_FFIPTR(cb)) \
T##_cb = (uv_##T##_cb)cb; \
else T##_cb = aio_##T##_cb
#define PN_CLOSURE(x)
Definition: potion.h:225
#define PN_IS_FFIPTR(p)
Definition: potion.h:181
#define PN_IS_CLOSURE(v)
Definition: potion.h:177

Definition at line 141 of file aio.c.

#define CHECK_AIO_TYPE (   self,
 
)    if (!potion_bind(P, self, PN_STR("Aio_"_XSTR(T)))) return potion_type_error_want(P, "self", self, ""_XSTR(T))

Definition at line 152 of file aio.c.

#define CHECK_AIO_STREAM (   stream)
Value:
{ \
PNType _t = PN_VTYPE(stream); \
if (_t != aio_stream_type && \
_t != aio_tcp_type && \
_t != aio_udp_type && \
_t != aio_pipe_type && \
_t != aio_tty_type && \
!potion_bind(P, stream, PN_STR("listen"))) \
return potion_type_error_want(P, "stream", stream, "Aio_stream"); \
}
PN potion_bind(Potion *P, PN rcv, PN msg)
find method for given receiver and message (method lookup)
Definition: objmodel.c:408
unsigned int PNType
Definition: potion.h:79
#define PN_STR(x)
Definition: potion.h:219
PNType aio_tty_type
Definition: aio.c:23
PNType aio_pipe_type
Definition: aio.c:23
PNType aio_udp_type
Definition: aio.c:23
#define PN_VTYPE(x)
Definition: potion.h:134
PNType aio_tcp_type
Definition: aio.c:23
PNType aio_stream_type
Definition: aio.c:23
PN potion_type_error_want(Potion *P, const char *param, PN obj, const char *type)
Definition: internal.c:277

Definition at line 154 of file aio.c.

#define FATAL_AIO_TYPE (   self,
 
)
Value:
if (!potion_bind(P, self, PN_STR("Aio_"_XSTR(T)))) { \
fprintf(stderr, "** Invalid type %s, expected %s", \
: PN_IS_NIL(self) ? NIL_NAME \
: PN_IS_INT(self) ? "Integer" : "Boolean", "Aio_"_XSTR(T)); \
exit(1); \
}
PN potion_bind(Potion *P, PN rcv, PN msg)
find method for given receiver and message (method lookup)
Definition: objmodel.c:408
#define NIL_NAME
Definition: potion.h:149
#define _XSTR(s)
Definition: potion.h:61
#define AS_STR(x)
Definition: potion.h:249
#define PN_STR(x)
Definition: potion.h:219
#define PN_IS_NIL(v)
Definition: potion.h:169
#define PN_IS_PTR(v)
Definition: potion.h:168
#define PN_IS_INT(v)
Definition: potion.h:171
#define potion_send(RCV, MSG, ARGS...)
method caches (more great stuff from ian piumarta)
Definition: potion.h:781
PN PN_name
Definition: internal.c:18
#define PN_VTABLE(t)
Definition: potion.h:136

Definition at line 166 of file aio.c.

#define FATAL_AIO_STREAM (   stream)
Value:
{ \
PNType _t = PN_VTYPE(stream); \
if (_t != aio_stream_type && \
_t != aio_tcp_type && \
_t != aio_udp_type && \
_t != aio_pipe_type && \
_t != aio_tty_type && \
!potion_bind(P, stream, PN_STR("listen"))) \
{ \
fprintf(stderr, "** Invalid type %s, expected %s", \
: PN_IS_NIL(stream) ? NIL_NAME \
: PN_IS_INT(stream) ? "Integer" : "Boolean", "Aio_stream");\
exit(1); \
} \
}
PN potion_bind(Potion *P, PN rcv, PN msg)
find method for given receiver and message (method lookup)
Definition: objmodel.c:408
#define NIL_NAME
Definition: potion.h:149
#define AS_STR(x)
Definition: potion.h:249
unsigned int PNType
Definition: potion.h:79
#define PN_STR(x)
Definition: potion.h:219
PNType aio_tty_type
Definition: aio.c:23
#define PN_IS_NIL(v)
Definition: potion.h:169
PNType aio_pipe_type
Definition: aio.c:23
PNType aio_udp_type
Definition: aio.c:23
#define PN_VTYPE(x)
Definition: potion.h:134
#define PN_IS_PTR(v)
Definition: potion.h:168
PNType aio_tcp_type
Definition: aio.c:23
#define PN_IS_INT(v)
Definition: potion.h:171
#define potion_send(RCV, MSG, ARGS...)
method caches (more great stuff from ian piumarta)
Definition: potion.h:781
PNType aio_stream_type
Definition: aio.c:23
PN PN_name
Definition: internal.c:18
#define PN_VTABLE(t)
Definition: potion.h:136

Definition at line 174 of file aio.c.

#define AIO_DATA (   T,
  ARG 
)
Value:
(aio_##T##_t*)PN_DATA(potion_fwd(ARG)); \
static PN potion_fwd(PN)
the potion type is the 't' in the vtable tuple (m,t)
Definition: potion.h:570
#define CHECK_AIO_TYPE(self, T)
Definition: aio.c:152
#define PN_DATA(x)
Definition: potion.h:230

Definition at line 192 of file aio.c.

#define AIO_STREAM (   ARG)
Value:
(aio_stream_t*)PN_DATA(potion_fwd(ARG)); \
static PN potion_fwd(PN)
the potion type is the 't' in the vtable tuple (m,t)
Definition: potion.h:570
#define CHECK_AIO_STREAM(stream)
Definition: aio.c:154
#define PN_DATA(x)
Definition: potion.h:230

Definition at line 195 of file aio.c.

#define DEF_AIO_CB (   T)
Value:
aio_##T##_t* wrap = (aio_##T##_t*)req; \
vPN(Closure) cb = PN_CLOSURE(wrap->cb); \
PN data = (PN)((char*)wrap - sizeof(struct PNData)); \
Potion *P = wrap->P; \
FATAL_AIO_TYPE(data,T); \
if (cb) cb->method(P, (PN)cb, data, PN_NUM(status))
#define PN_CLOSURE(x)
Definition: potion.h:225
struct to wrap arbitrary data that we may want to allocate from Potion.
Definition: potion.h:326
#define PN_NUM(i)
Definition: potion.h:213
the global interpreter state P. currently singleton (not threads yet)
Definition: potion.h:653
#define vPN(t)
Definition: buffile.c:34
volatile _PN PN
Definition: potion.h:81
#define FATAL_AIO_TYPE(self, T)
Definition: aio.c:166

Definition at line 200 of file aio.c.

#define DEF_AIO_CB_NOSTATUS (   T)
Value:
aio_##T##_t* wrap = (aio_##T##_t*)req; \
vPN(Closure) cb = PN_CLOSURE(wrap->cb); \
PN data = (PN)((char*)wrap - sizeof(struct PNData)); \
Potion *P = wrap->P; \
FATAL_AIO_TYPE(data,T); \
if (cb) cb->method(P, (PN)cb, data)
#define PN_CLOSURE(x)
Definition: potion.h:225
struct to wrap arbitrary data that we may want to allocate from Potion.
Definition: potion.h:326
the global interpreter state P. currently singleton (not threads yet)
Definition: potion.h:653
#define vPN(t)
Definition: buffile.c:34
volatile _PN PN
Definition: potion.h:81
#define FATAL_AIO_TYPE(self, T)
Definition: aio.c:166

Definition at line 207 of file aio.c.

#define DEF_AIO__VT (   T,
  paren 
)
Value:
PN aio_##T##_vt = potion_class(P, 0, paren##_vt, 0); \
aio_##T##_type = potion_class_type(P, aio_##T##_vt); \
potion_define_global(P, PN_STR("Aio_" _XSTR(T)), aio_##T##_vt); \
potion_method(aio_##T##_vt, ""_XSTR(T), aio_##T##_new, 0)
PN potion_class(Potion *P, PN cl, PN self, PN ivars)
create a user-class (ie type)
Definition: objmodel.c:257
#define _XSTR(s)
Definition: potion.h:61
#define potion_method(RCV, MSG, FN, SIG)
Definition: potion.h:789
#define PN_STR(x)
Definition: potion.h:219
PNType potion_class_type(Potion *P, PN class)
Definition: objmodel.c:290
void potion_define_global(Potion *P, PN name, PN val)
Definition: objmodel.c:628
volatile _PN PN
Definition: potion.h:81
#define DEF_AIO_CTOR (   T)    potion_type_constructor_is(aio_##T##_vt, PN_FUNC(aio_##T##_new, 0));
#define DEF_AIO_VT (   T,
  paren 
)
Value:
PN aio_##T##_vt = potion_class(P, 0, paren##_vt, 0); \
aio_##T##_type = potion_class_type(P, aio_##T##_vt); \
potion_define_global(P, PN_STR("Aio_" _XSTR(T)), aio_##T##_vt); \
potion_method(aio_##T##_vt, ""_XSTR(T), aio_##T##_new, 0)
PN potion_class(Potion *P, PN cl, PN self, PN ivars)
create a user-class (ie type)
Definition: objmodel.c:257
#define _XSTR(s)
Definition: potion.h:61
#define potion_method(RCV, MSG, FN, SIG)
Definition: potion.h:789
#define PN_STR(x)
Definition: potion.h:219
PNType potion_class_type(Potion *P, PN class)
Definition: objmodel.c:290
void potion_define_global(Potion *P, PN name, PN val)
Definition: objmodel.c:628
#define DEF_AIO_CTOR(T)
volatile _PN PN
Definition: potion.h:81
#define DEF_AIO_GLOBAL_VT (   T,
  paren,
  args 
)
Value:
DEF_AIO__VT(T,paren); \
potion_type_constructor_is(aio_##T##_vt, PN_FUNC(aio_##T##_new, args)); \
potion_method(P->lobby, "Aio_"_XSTR(T), aio_##T##_new, args)
#define _XSTR(s)
Definition: potion.h:61
#define potion_method(RCV, MSG, FN, SIG)
Definition: potion.h:789
#define DEF_AIO__VT(T, paren)
#define PN_FUNC(f, s)
Definition: potion.h:228
void potion_type_constructor_is(PN vt, PN cl)
set default constructor
Definition: objmodel.c:250
const u8 args
Definition: compile.c:31
#define DEF_AIO_NUM_GLOBAL (   name)    potion_define_global(P, PN_STR("AIO_"_XSTR(name)), PN_NUM(UV_##name))

Typedef Documentation

typedef uv_buf_t aio_buf_t

Definition at line 47 of file aio.c.

Function Documentation

DEF_AIO_CB_WRAP ( write  )
DEF_AIO_CB_WRAP ( connect  )
DEF_AIO_CB_WRAP ( shutdown  )
DEF_AIO_CB_WRAP1 ( connection  ,
stream  ,
connection   
)
DEF_AIO_CB_WRAP1 ( close  ,
handle  ,
close   
)
DEF_AIO_CB_WRAP ( timer  )
DEF_AIO_CB_WRAP ( async  )
DEF_AIO_CB_WRAP ( prepare  )
DEF_AIO_CB_WRAP ( check  )
DEF_AIO_CB_WRAP ( idle  )
DEF_AIO_CB_WRAP1 ( exit  ,
process  ,
exit   
)
DEF_AIO_CB_WRAP1 ( walk  ,
handle  ,
walk   
)
DEF_AIO_CB_WRAP ( fs  )
DEF_AIO_CB_WRAP ( fs_poll  )
DEF_AIO_CB_WRAP ( fs_event  )
DEF_AIO_HANDLE_WRAP ( process  )
DEF_AIO_CB_WRAP ( work  )
DEF_AIO_CB_WRAP1 ( after_work  ,
work  ,
after_work   
)
DEF_AIO_CB_WRAP ( getaddrinfo  )
DEF_AIO_CB_WRAP ( signal  )
DEF_AIO_HANDLE_WRAP ( handle  )
DEF_AIO_HANDLE_WRAP ( loop  )
DEF_AIO_CB_WRAP ( pipe  )
DEF_AIO_HANDLE_WRAP ( stdio_container  )
DEF_AIO_HANDLE_WRAP ( process_options  )
DEF_AIO_CB_WRAP1 ( stream  ,
stream  ,
read   
)
DEF_AIO_HANDLE_WRAP ( tty  )
DEF_AIO_CB_WRAP ( req  )
DEF_AIO_CB_WRAP1 ( tcp  ,
tcp  ,
read   
)
DEF_AIO_CB_WRAP1 ( udp  ,
udp  ,
udp_recv   
)
DEF_AIO_CB_WRAP ( udp_send  )
DEF_AIO_HANDLE_WRAP ( cpu_info  )
DEF_AIO_HANDLE_WRAP ( interface_address  )
DEF_AIO_HANDLE_WRAP ( sem  )
DEF_AIO_HANDLE_WRAP ( barrier  )
DEF_AIO_HANDLE_WRAP ( cond  )
DEF_AIO_HANDLE_WRAP ( mutex  )
DEF_AIO_HANDLE_WRAP ( rwlock  )
static PN aio_error ( Potion P,
char *  name,
int  status 
)
static

Definition at line 110 of file aio.c.

static void aio_getaddrinfo_cb ( uv_getaddrinfo_t *  req,
int  status,
struct addrinfo *  res 
)
static

Definition at line 216 of file aio.c.

static PN aio_tcp_new ( Potion P,
PN  cl,
PN  self,
PN  loop 
)
static

Definition at line 231 of file aio.c.

static PN aio_udp_new ( Potion P,
PN  cl,
PN  self,
PN  loop 
)
static

Definition at line 255 of file aio.c.

static PN aio_prepare_new ( Potion P,
PN  cl,
PN  self,
PN  loop 
)
static

Definition at line 343 of file aio.c.

static PN aio_check_new ( Potion P,
PN  cl,
PN  self,
PN  loop 
)
static

Definition at line 349 of file aio.c.

static PN aio_idle_new ( Potion P,
PN  cl,
PN  self,
PN  loop 
)
static

Definition at line 355 of file aio.c.

static PN aio_timer_new ( Potion P,
PN  cl,
PN  self,
PN  loop 
)
static

Definition at line 362 of file aio.c.

static PN aio_signal_new ( Potion P,
PN  cl,
PN  self,
PN  loop 
)
static

Definition at line 404 of file aio.c.

static PN aio_loop_new ( Potion P,
PN  cl,
PN  self 
)
static

Definition at line 410 of file aio.c.

static PN aio_handle_new ( Potion P,
PN  cl,
PN  self 
)
static

Definition at line 422 of file aio.c.

static PN aio_stream_new ( Potion P,
PN  cl,
PN  self 
)
static

Definition at line 428 of file aio.c.

static PN aio_req_new ( Potion P,
PN  cl,
PN  self 
)
static

Definition at line 434 of file aio.c.

static PN aio_connect_new ( Potion P,
PN  cl,
PN  self 
)
static

Definition at line 440 of file aio.c.

static PN aio_write_new ( Potion P,
PN  cl,
PN  self 
)
static

Definition at line 446 of file aio.c.

static PN aio_shutdown_new ( Potion P,
PN  cl,
PN  self 
)
static

Definition at line 452 of file aio.c.

static PN aio_udp_send_new ( Potion P,
PN  cl,
PN  self 
)
static

Definition at line 458 of file aio.c.

static PN aio_fs_poll_new ( Potion P,
PN  cl,
PN  self,
PN  loop 
)
static

Definition at line 469 of file aio.c.

static PN aio_fs_new ( Potion P,
PN  cl,
PN  self 
)
static

Definition at line 486 of file aio.c.

static PN aio_fs_event_new ( Potion P,
PN  cl,
PN  self,
PN  loop 
)
static

Definition at line 492 of file aio.c.

static PN aio_process_options ( Potion P,
PN  cl,
PN  self 
)
static

Definition at line 516 of file aio.c.

static PN aio_work_new ( Potion P,
PN  cl,
PN  self 
)
static

Definition at line 525 of file aio.c.

static PN aio_getaddrinfo_new ( Potion P,
PN  cl,
PN  self,
PN  cb,
PN  node,
PN  service,
PN  hints,
PN  loop 
)
static

Definition at line 542 of file aio.c.

static PN aio_cpu_info_new ( Potion P,
PN  cl,
PN  self 
)
static

Definition at line 558 of file aio.c.

static PN aio_interface_address_new ( Potion P,
PN  cl,
PN  self 
)
static

Definition at line 562 of file aio.c.

static PN aio_tty_new ( Potion P,
PN  cl,
PN  self,
PN  file,
PN  readable,
PN  loop 
)
static

Definition at line 572 of file aio.c.

static PN aio_pipe_new ( Potion P,
PN  cl,
PN  self,
PN  ipc,
PN  loop 
)
static

Definition at line 585 of file aio.c.

static PN aio_barrier_new ( Potion P,
PN  cl,
PN  self,
PN  count 
)
static

Definition at line 601 of file aio.c.

static PN aio_sem_new ( Potion P,
PN  cl,
PN  self,
PN  value 
)
static

Definition at line 611 of file aio.c.

static void aio_async_cb ( uv_async_t *  req)
static

Definition at line 619 of file aio.c.

static PN aio_async_new ( Potion P,
PN  cl,
PN  self,
PN  cb,
PN  loop 
)
static

Definition at line 622 of file aio.c.

static PN aio_cond_new ( Potion P,
PN  cl,
PN  self 
)
static

Definition at line 629 of file aio.c.

static PN aio_mutex_new ( Potion P,
PN  cl,
PN  self 
)
static

Definition at line 635 of file aio.c.

static PN aio_rwlock_new ( Potion P,
PN  cl,
PN  self 
)
static

Definition at line 641 of file aio.c.

static void aio_write_cb ( uv_write_t *  req,
int  status 
)
static

Definition at line 649 of file aio.c.

static void aio_connect_cb ( uv_connect_t *  req,
int  status 
)
static

Definition at line 653 of file aio.c.

static void aio_shutdown_cb ( uv_shutdown_t *  req,
int  status 
)
static

Definition at line 673 of file aio.c.

static void aio_prepare_cb ( uv_prepare_t *  req)
static

Definition at line 677 of file aio.c.

static void aio_check_cb ( uv_check_t *  req)
static

Definition at line 681 of file aio.c.

static void aio_connection_cb ( uv_stream_t *  req,
int  status 
)
static

Definition at line 685 of file aio.c.

static void aio_udp_send_cb ( uv_udp_send_t *  req,
int  status 
)
static

Definition at line 689 of file aio.c.

static void aio_idle_cb ( uv_idle_t *  req)
static

Definition at line 693 of file aio.c.

static void aio_timer_cb ( uv_timer_t *  req)
static

Definition at line 697 of file aio.c.

static void aio_signal_cb ( uv_signal_t *  req,
int  status 
)
static

Definition at line 701 of file aio.c.

static void aio_fs_cb ( uv_fs_t *  req)
static

Definition at line 722 of file aio.c.

static void aio_read_cb ( uv_stream_t *  stream,
ssize_t  nread,
const uv_buf_t *  buf 
)
static

Definition at line 733 of file aio.c.

static void aio_walk_cb ( uv_handle_t *  handle,
void *  arg 
)
static

Definition at line 744 of file aio.c.

static void aio_close_cb ( uv_handle_t *  handle)
static

Definition at line 753 of file aio.c.

static PN aio_size ( Potion P,
PN  cl,
PN  self 
)
static

Definition at line 776 of file aio.c.

static void aio_alloc_cb ( uv_handle_t *  handle,
size_t  suggested_size,
uv_buf_t *  buf 
)
static

Definition at line 1070 of file aio.c.

static PN aio_check_stop ( Potion P,
PN  cl,
PN  self 
)
static

Definition at line 1153 of file aio.c.

static PN aio_spawn ( Potion P,
PN  cl,
PN  self,
PN  options,
PN  loop 
)
static

Definition at line 1545 of file aio.c.

DLLEXPORT void Potion_Init_aio ( Potion P)

Definition at line 1809 of file aio.c.

Variable Documentation

PNType aio_type

Definition at line 23 of file aio.c.

PNType aio_tcp_type

Definition at line 23 of file aio.c.

PNType aio_udp_type

Definition at line 23 of file aio.c.

PNType aio_loop_type

Definition at line 23 of file aio.c.

PNType aio_tty_type

Definition at line 23 of file aio.c.

PNType aio_pipe_type

Definition at line 23 of file aio.c.

PNType aio_prepare_type

Definition at line 23 of file aio.c.

PNType aio_idle_type

Definition at line 23 of file aio.c.

PNType aio_async_type

Definition at line 23 of file aio.c.

PNType aio_timer_type

Definition at line 23 of file aio.c.

PNType aio_fs_poll_type

Definition at line 23 of file aio.c.

PNType aio_signal_type

Definition at line 23 of file aio.c.

PNType aio_fs_event_type

Definition at line 23 of file aio.c.

PNType aio_mutex_type

Definition at line 23 of file aio.c.

PNType aio_rwlock_type

Definition at line 23 of file aio.c.

PNType aio_sem_type

Definition at line 23 of file aio.c.

PNType aio_cond_type

Definition at line 23 of file aio.c.

PNType aio_barrier_type

Definition at line 23 of file aio.c.

PNType aio_check_type

Definition at line 23 of file aio.c.

PNType aio_handle_type

Definition at line 23 of file aio.c.

PNType aio_process_options_type

Definition at line 23 of file aio.c.

PNType aio_process_type

Definition at line 23 of file aio.c.

PNType aio_stream_type

Definition at line 23 of file aio.c.

PNType aio_req_type

Definition at line 23 of file aio.c.

PNType aio_connect_type

Definition at line 23 of file aio.c.

PNType aio_write_type

Definition at line 23 of file aio.c.

PNType aio_shutdown_type

Definition at line 23 of file aio.c.

PNType aio_udp_send_type

Definition at line 23 of file aio.c.

PNType aio_fs_type

Definition at line 23 of file aio.c.

PNType aio_work_type

Definition at line 23 of file aio.c.

PNType aio_getaddrinfo_type

Definition at line 23 of file aio.c.

PNType aio_cpu_info_type

Definition at line 23 of file aio.c.

PNType aio_interface_address_type

Definition at line 23 of file aio.c.