Lines Matching refs:context
33 typedef void io_callback_t(void *context);
34 typedef void timeout_callback_t(void *context);
55 io_callback_t *callback, void *context) ATTR_NULL(5);
56 #define io_add(fd, condition, callback, context) \
58 CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \
59 (io_callback_t *)callback, context)
63 io_callback_t *callback, void *context) ATTR_NULL(5);
64 #define io_add_to(ioloop, fd, condition, callback, context) \
66 CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \
67 (io_callback_t *)callback, context)
72 io_callback_t *callback, void *context,
74 #define io_add_notify(path, callback, context, io_r) \
76 CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \
77 (io_callback_t *)callback, context, io_r)
81 io_callback_t *callback, void *context) ATTR_NULL(3);
82 #define io_add_istream(input, callback, context) \
84 CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \
85 (io_callback_t *)callback, context)
89 io_callback_t *callback, void *context)
91 #define io_add_istream_to(ioloop, input, callback, context) \
93 CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \
94 (io_callback_t *)callback, context)
112 timeout_callback_t *callback, void *context) ATTR_NULL(4);
113 #define timeout_add(msecs, callback, context) \
115 CALLBACK_TYPECHECK(callback, void (*)(typeof(context))) + \
118 (io_callback_t *)callback, context)
122 timeout_callback_t *callback, void *context) ATTR_NULL(4);
123 #define timeout_add_to(ioloop, msecs, callback, context) \
125 CALLBACK_TYPECHECK(callback, void (*)(typeof(context))) + \
128 (io_callback_t *)callback, context)
133 timeout_callback_t *callback, void *context) ATTR_NULL(4);
134 #define timeout_add_short(msecs, callback, context) \
136 CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \
137 (io_callback_t *)callback, context)
141 timeout_callback_t *callback, void *context) ATTR_NULL(4);
142 #define timeout_add_short_to(ioloop, msecs, callback, context) \
144 CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \
145 (io_callback_t *)callback, context)
151 timeout_callback_t *callback, void *context) ATTR_NULL(4);
152 #define timeout_add_absolute(time, callback, context) \
154 CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \
155 (io_callback_t *)callback, context)
161 timeout_callback_t *callback, void *context) ATTR_NULL(4);
162 #define timeout_add_absolute_to(ioloop, time, callback, context) \
164 CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \
165 (io_callback_t *)callback, context)
200 /* Create a new ioloop context. This context is automatically attached to all
201 the following I/Os and timeouts that are added until the context is
203 added I/O or timeout callback is called, this context is automatically
206 Creating this context already deactivates any currently running context
207 and activates the newly created context. */
211 /* Call the activate callback when this context is activated (I/O callback is
212 about to be called), and the deactivate callback when the context is
215 The ioloop context is a global state, so only a single context can be active
218 no context to the active context, and deactive() is called only when
219 switching from previously activated context into no context. No context is
223 io_callback_t *deactivate, void *context);
224 #define io_loop_context_add_callbacks(ctx, activate, deactivate, context) \
226 CALLBACK_TYPECHECK(activate, void (*)(typeof(context))) + \
227 CALLBACK_TYPECHECK(deactivate, void (*)(typeof(context))), \
228 (io_callback_t *)deactivate, context)
229 /* Remove callbacks with the given callbacks and context. */
232 io_callback_t *deactivate, void *context);
233 #define io_loop_context_remove_callbacks(ctx, activate, deactivate, context) \
235 CALLBACK_TYPECHECK(activate, void (*)(typeof(context))) + \
236 CALLBACK_TYPECHECK(deactivate, void (*)(typeof(context))), \
237 (io_callback_t *)deactivate, context)
238 /* Returns the current context set to ioloop. */
241 /* Explicitly activate an ioloop context. There must not be any context active
243 running. An activated context must be explicitly deactivated with
247 /* Explicitly deactivate an ioloop context. The given context must be currently
248 active or it assert-crashes. This should be called only after a context