summaryrefslogtreecommitdiff
path: root/ot_fullscrape.c
diff options
context:
space:
mode:
authorerdgeist <>2007-11-19 21:14:09 +0000
committererdgeist <>2007-11-19 21:14:09 +0000
commit6d09527ed8442e856920686bd03fa2d582da6956 (patch)
tree4ea3ade94bc492859db1a482975d48fcb224016b /ot_fullscrape.c
parent49ba269b9d09746e90e153f3e245eaf3f97e35cc (diff)
Fullscrape now cleanly finalizes its thread
Diffstat (limited to 'ot_fullscrape.c')
-rw-r--r--ot_fullscrape.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ot_fullscrape.c b/ot_fullscrape.c
index 6f898c4..bcf238c 100644
--- a/ot_fullscrape.c
+++ b/ot_fullscrape.c
@@ -52,11 +52,15 @@ static void * fullscrape_worker( void * args) {
52 return NULL; 52 return NULL;
53} 53}
54 54
55static pthread_t thread_id;
55void fullscrape_init( ) { 56void fullscrape_init( ) {
56 pthread_t thread_id;
57 pthread_create( &thread_id, NULL, fullscrape_worker, NULL ); 57 pthread_create( &thread_id, NULL, fullscrape_worker, NULL );
58} 58}
59 59
60void fullscrape_deinit( ) {
61 pthread_cancel( thread_id );
62}
63
60void fullscrape_deliver( int64 socket, ot_tasktype tasktype ) { 64void fullscrape_deliver( int64 socket, ot_tasktype tasktype ) {
61 mutex_workqueue_pushtask( socket, tasktype ); 65 mutex_workqueue_pushtask( socket, tasktype );
62} 66}