summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_chan.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nxt_chan.h')
-rw-r--r--src/nxt_chan.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/nxt_chan.h b/src/nxt_chan.h
index f9550f17..48cd1a9b 100644
--- a/src/nxt_chan.h
+++ b/src/nxt_chan.h
@@ -26,13 +26,15 @@ typedef struct {
typedef struct nxt_chan_recv_msg_s nxt_chan_recv_msg_t;
-typedef void (*nxt_chan_handler_t)(nxt_thread_t *thr, nxt_chan_recv_msg_t *msg);
+typedef void (*nxt_chan_handler_t)(nxt_task_t *task, nxt_chan_recv_msg_t *msg);
typedef struct {
/* Must be the first field. */
nxt_event_fd_t socket;
+ nxt_task_t task;
+
nxt_queue_t messages; /* of nxt_chan_send_msg_t */
/* Maximum size of message part. */
@@ -62,12 +64,12 @@ struct nxt_chan_recv_msg_s {
NXT_EXPORT nxt_chan_t *nxt_chan_alloc(void);
NXT_EXPORT nxt_chan_t *nxt_chan_create(size_t bufsize);
NXT_EXPORT void nxt_chan_destroy(nxt_chan_t *chan);
-NXT_EXPORT void nxt_chan_write_enable(nxt_thread_t *thr, nxt_chan_t *chan);
+NXT_EXPORT void nxt_chan_write_enable(nxt_task_t *task, nxt_chan_t *chan);
NXT_EXPORT void nxt_chan_write_close(nxt_chan_t *chan);
-NXT_EXPORT void nxt_chan_read_enable(nxt_thread_t *thr, nxt_chan_t *chan);
+NXT_EXPORT void nxt_chan_read_enable(nxt_task_t *task, nxt_chan_t *chan);
NXT_EXPORT void nxt_chan_read_close(nxt_chan_t *chan);
-NXT_EXPORT nxt_int_t nxt_chan_write(nxt_chan_t *chan, nxt_uint_t type,
- nxt_fd_t fd, uint32_t stream, nxt_buf_t *b);
+NXT_EXPORT nxt_int_t nxt_chan_write(nxt_task_t *task, nxt_chan_t *chan,
+ nxt_uint_t type, nxt_fd_t fd, uint32_t stream, nxt_buf_t *b);
#endif /* _NXT_UNIX_CHAN_H_INCLUDED_ */