diff options
author | Poornima G <pgurusid@redhat.com> | 2015-02-18 21:40:46 +0530 |
---|---|---|
committer | Shyamsundar Ranganathan <srangana@redhat.com> | 2015-03-03 06:45:21 -0800 |
commit | 2acfbcf34ed77985905b2d122adbfd541eb01db1 (patch) | |
tree | 7af9b26759f2c9d5f863cbd1b5135888484fc630 /libglusterfs/src/event.h | |
parent | 4ff398987805ba72010d328c61a5682088d32cf4 (diff) |
event_pool: Add the code to destroy the poller threads and event pool gracefully.
Change-Id: I49b6ceebb45773620c318fb5d20b81623db75ab6
BUG: 1093594
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: http://review.gluster.org/9691
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Diffstat (limited to 'libglusterfs/src/event.h')
-rw-r--r-- | libglusterfs/src/event.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libglusterfs/src/event.h b/libglusterfs/src/event.h index 930a7d1e28b..eac57bc01ad 100644 --- a/libglusterfs/src/event.h +++ b/libglusterfs/src/event.h @@ -60,6 +60,8 @@ struct event_pool { int eventthreadcount; /* number of event threads to execute. */ pthread_t pollers[EVENT_MAX_THREADS]; /* poller thread_id store, * and live status */ + int destroy; + int activethreadcount; }; struct event_ops { @@ -81,6 +83,7 @@ struct event_ops { int (*event_reconfigure_threads) (struct event_pool *event_pool, int newcount); + int (*event_pool_destroy) (struct event_pool *event_pool); }; struct event_pool *event_pool_new (int count, int eventthreadcount); @@ -93,5 +96,6 @@ int event_unregister (struct event_pool *event_pool, int fd, int idx); int event_unregister_close (struct event_pool *event_pool, int fd, int idx); int event_dispatch (struct event_pool *event_pool); int event_reconfigure_threads (struct event_pool *event_pool, int value); - +int event_pool_destroy (struct event_pool *event_pool); +int event_dispatch_destroy (struct event_pool *event_pool); #endif /* _EVENT_H_ */ |