diff options
| author | erdgeist <> | 2008-10-07 23:44:59 +0000 | 
|---|---|---|
| committer | erdgeist <> | 2008-10-07 23:44:59 +0000 | 
| commit | ec0affa97de870f3acd280afff728adccd48b2c8 (patch) | |
| tree | 815bb871f6ac62a7ada26217b4a8d649ea8e57de /ot_livesync.c | |
| parent | 1c3c5d57dafc44c582a6d29a7db04cfeba2464da (diff) | |
allow threads to be named. not posix compliant.
Diffstat (limited to 'ot_livesync.c')
| -rw-r--r-- | ot_livesync.c | 6 | 
1 files changed, 6 insertions, 0 deletions
diff --git a/ot_livesync.c b/ot_livesync.c index 92c947c..382f702 100644 --- a/ot_livesync.c +++ b/ot_livesync.c  | |||
| @@ -8,6 +8,9 @@ | |||
| 8 | #include <sys/uio.h> | 8 | #include <sys/uio.h> | 
| 9 | #include <string.h> | 9 | #include <string.h> | 
| 10 | #include <pthread.h> | 10 | #include <pthread.h> | 
| 11 | #ifdef WANT_THREAD_NAME_NP | ||
| 12 | #include <pthread_np.h> | ||
| 13 | #endif | ||
| 11 | 14 | ||
| 12 | /* Libowfat */ | 15 | /* Libowfat */ | 
| 13 | #include "socket.h" | 16 | #include "socket.h" | 
| @@ -53,6 +56,9 @@ void livesync_init( ) { | |||
| 53 | livesync_lastpacket_time = g_now; | 56 | livesync_lastpacket_time = g_now; | 
| 54 | 57 | ||
| 55 | pthread_create( &thread_id, NULL, livesync_worker, NULL ); | 58 | pthread_create( &thread_id, NULL, livesync_worker, NULL ); | 
| 59 | #ifdef WANT_THREAD_NAME_NP | ||
| 60 | pthread_set_name_np( thread_id, "opentracker (livesync)"); | ||
| 61 | #endif | ||
| 56 | } | 62 | } | 
| 57 | 63 | ||
| 58 | void livesync_deinit() { | 64 | void livesync_deinit() { | 
