mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-20 04:37:04 +00:00
MINOR: task: Move wait_event in the task header file
wait_event structure was in connection header file because it is only used by connections and muxes. But, this may change. For instance applets may be good candidates to use it too. So, the structure is moved to the task header file instead.
This commit is contained in:
parent
e9bfc25581
commit
6734e56514
@ -37,6 +37,7 @@
|
||||
#include <haproxy/port_range-t.h>
|
||||
#include <haproxy/protocol-t.h>
|
||||
#include <haproxy/show_flags-t.h>
|
||||
#include <haproxy/task-t.h>
|
||||
#include <haproxy/thread-t.h>
|
||||
|
||||
/* referenced below */
|
||||
@ -54,14 +55,6 @@ struct bind_conf;
|
||||
struct qcs;
|
||||
struct ssl_sock_ctx;
|
||||
|
||||
/* Note: subscribing to these events is only valid after the caller has really
|
||||
* attempted to perform the operation, and failed to proceed or complete.
|
||||
*/
|
||||
enum sub_event_type {
|
||||
SUB_RETRY_RECV = 0x00000001, /* Schedule the tasklet when we can attempt to recv again */
|
||||
SUB_RETRY_SEND = 0x00000002, /* Schedule the tasklet when we can attempt to send again */
|
||||
};
|
||||
|
||||
/* For each direction, we have a CO_FL_XPRT_<DIR>_ENA flag, which
|
||||
* indicates if read or write is desired in that direction for the respective
|
||||
* layers. The current status corresponding to the current layer being used is
|
||||
@ -371,16 +364,6 @@ struct socks4_request {
|
||||
char user_id[8]; /* the user ID string, variable length, terminated with a null (0x00); Using "HAProxy\0" */
|
||||
};
|
||||
|
||||
/* Describes a set of subscriptions. Multiple events may be registered at the
|
||||
* same time. The callee should assume everything not pending for completion is
|
||||
* implicitly possible. It's illegal to change the tasklet if events are still
|
||||
* registered.
|
||||
*/
|
||||
struct wait_event {
|
||||
struct tasklet *tasklet;
|
||||
int events; /* set of enum sub_event_type above */
|
||||
};
|
||||
|
||||
/* A connection handle is how we differentiate two connections on the lower
|
||||
* layers. It usually is a file descriptor but can be a connection id. The
|
||||
* CO_FL_FDLESS flag indicates which one is relevant.
|
||||
|
@ -164,6 +164,24 @@ struct tasklet {
|
||||
*/
|
||||
};
|
||||
|
||||
/* Note: subscribing to these events is only valid after the caller has really
|
||||
* attempted to perform the operation, and failed to proceed or complete.
|
||||
*/
|
||||
enum sub_event_type {
|
||||
SUB_RETRY_RECV = 0x00000001, /* Schedule the tasklet when we can attempt to recv again */
|
||||
SUB_RETRY_SEND = 0x00000002, /* Schedule the tasklet when we can attempt to send again */
|
||||
};
|
||||
|
||||
/* Describes a set of subscriptions. Multiple events may be registered at the
|
||||
* same time. The callee should assume everything not pending for completion is
|
||||
* implicitly possible. It's illegal to change the tasklet if events are still
|
||||
* registered.
|
||||
*/
|
||||
struct wait_event {
|
||||
struct tasklet *tasklet;
|
||||
int events; /* set of enum sub_event_type above */
|
||||
};
|
||||
|
||||
/*
|
||||
* The task callback (->process) is responsible for updating ->expire. It must
|
||||
* return a pointer to the task itself, except if the task has been deleted, in
|
||||
|
Loading…
Reference in New Issue
Block a user