diff options
Diffstat (limited to 'rpc/rpc-transport/socket/src/socket.h')
| -rw-r--r-- | rpc/rpc-transport/socket/src/socket.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.h b/rpc/rpc-transport/socket/src/socket.h index 78faad903..e0b412fcc 100644 --- a/rpc/rpc-transport/socket/src/socket.h +++ b/rpc/rpc-transport/socket/src/socket.h @@ -184,6 +184,14 @@ struct gf_sock_incoming { char *ra_buf; }; +typedef enum { + OT_IDLE, /* Uninitialized or termination complete. */ + OT_SPAWNING, /* Past pthread_create but not in thread yet. */ + OT_RUNNING, /* Poller thread running normally. */ + OT_CALLBACK, /* Poller thread in the middle of a callback. */ + OT_PLEASE_DIE, /* Poller termination requested. */ +} ot_state_t; + typedef struct { int32_t sock; int32_t idx; @@ -222,7 +230,9 @@ typedef struct { pthread_t thread; int pipe[2]; gf_boolean_t own_thread; - volatile int socket_gen; + ot_state_t ot_state; + uint32_t ot_gen; + gf_boolean_t is_server; } socket_private_t; |
