summaryrefslogtreecommitdiff
path: root/ot_fullscrape.c
diff options
context:
space:
mode:
authorerdgeist <>2008-10-07 23:44:59 +0000
committererdgeist <>2008-10-07 23:44:59 +0000
commitec0affa97de870f3acd280afff728adccd48b2c8 (patch)
tree815bb871f6ac62a7ada26217b4a8d649ea8e57de /ot_fullscrape.c
parent1c3c5d57dafc44c582a6d29a7db04cfeba2464da (diff)
allow threads to be named. not posix compliant.
Diffstat (limited to 'ot_fullscrape.c')
-rw-r--r--ot_fullscrape.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ot_fullscrape.c b/ot_fullscrape.c
index abd8cee..cab619b 100644
--- a/ot_fullscrape.c
+++ b/ot_fullscrape.c
@@ -15,6 +15,9 @@
15#ifdef WANT_COMPRESSION_GZIP 15#ifdef WANT_COMPRESSION_GZIP
16#include <zlib.h> 16#include <zlib.h>
17#endif 17#endif
18#ifdef WANT_THREAD_NAME_NP
19#include <pthread_np.h>
20#endif
18 21
19/* Libowfat */ 22/* Libowfat */
20#include "byte.h" 23#include "byte.h"
@@ -73,6 +76,9 @@ static void * fullscrape_worker( void * args ) {
73static pthread_t thread_id; 76static pthread_t thread_id;
74void fullscrape_init( ) { 77void fullscrape_init( ) {
75 pthread_create( &thread_id, NULL, fullscrape_worker, NULL ); 78 pthread_create( &thread_id, NULL, fullscrape_worker, NULL );
79#ifdef WANT_THREAD_NAME_NP
80 pthread_set_name_np( thread_id, "opentracker (fullscrape)");
81#endif
76} 82}
77 83
78void fullscrape_deinit( ) { 84void fullscrape_deinit( ) {