diff options
author | Martin Willi <martin@strongswan.org> | 2005-12-04 11:46:58 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2005-12-04 11:46:58 +0000 |
commit | 25c41f4df7079b64ba53184e47edbc012ae96123 (patch) | |
tree | 93d1ff241cd7bf140c4780478750a20316a9c516 /Source/charon/threads | |
parent | 26cfe75e4d4266c75ad6adb5244beec6731e6956 (diff) | |
download | strongswan-25c41f4df7079b64ba53184e47edbc012ae96123.tar.bz2 strongswan-25c41f4df7079b64ba53184e47edbc012ae96123.tar.xz |
- logging cleanup
- pid re-replaced with thread_ids, since nptl does not distinguish pids between threads
Diffstat (limited to 'Source/charon/threads')
-rw-r--r-- | Source/charon/threads/receiver.c | 3 | ||||
-rw-r--r-- | Source/charon/threads/scheduler.c | 3 | ||||
-rw-r--r-- | Source/charon/threads/sender.c | 3 | ||||
-rw-r--r-- | Source/charon/threads/thread_pool.c | 3 |
4 files changed, 4 insertions, 8 deletions
diff --git a/Source/charon/threads/receiver.c b/Source/charon/threads/receiver.c index e02fd89e1..85410d298 100644 --- a/Source/charon/threads/receiver.c +++ b/Source/charon/threads/receiver.c @@ -22,7 +22,6 @@ #include <stdlib.h> #include <pthread.h> -#include <unistd.h> #include "receiver.h" @@ -74,7 +73,7 @@ static void receive_packets(private_receiver_t * this) /* cancellation disabled by default */ pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); - this->logger->log(this->logger, CONTROL, "receiver thread running, pid %d", getpid()); + this->logger->log(this->logger, CONTROL, "receiver thread running, thread_id %u", (int)pthread_self()); while (1) { diff --git a/Source/charon/threads/scheduler.c b/Source/charon/threads/scheduler.c index 50271eb62..e4f9ab308 100644 --- a/Source/charon/threads/scheduler.c +++ b/Source/charon/threads/scheduler.c @@ -22,7 +22,6 @@ #include <stdlib.h> #include <pthread.h> -#include <unistd.h> #include "scheduler.h" @@ -73,7 +72,7 @@ static void get_events(private_scheduler_t * this) /* cancellation disabled by default */ pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); - this->logger->log(this->logger, CONTROL, "scheduler thread running, pid %d", getpid()); + this->logger->log(this->logger, CONTROL, "scheduler thread running, thread_id %u", (int)pthread_self()); for (;;) { diff --git a/Source/charon/threads/sender.c b/Source/charon/threads/sender.c index 7c7180ad8..c47c4e2c0 100644 --- a/Source/charon/threads/sender.c +++ b/Source/charon/threads/sender.c @@ -22,7 +22,6 @@ #include <stdlib.h> #include <pthread.h> -#include <unistd.h> #include "sender.h" @@ -74,7 +73,7 @@ static void send_packets(private_sender_t * this) /* cancellation disabled by default */ pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); - this->logger->log(this->logger, CONTROL, "sender thread running, pid %d", getpid()); + this->logger->log(this->logger, CONTROL, "sender thread running, thread_id %u", (int)pthread_self()); while (1) { diff --git a/Source/charon/threads/thread_pool.c b/Source/charon/threads/thread_pool.c index 26c4d1f29..0146e1c6e 100644 --- a/Source/charon/threads/thread_pool.c +++ b/Source/charon/threads/thread_pool.c @@ -24,7 +24,6 @@ #include <pthread.h> #include <string.h> #include <errno.h> -#include <unistd.h> #include "thread_pool.h" @@ -119,7 +118,7 @@ static void process_jobs(private_thread_pool_t *this) /* cancellation disabled by default */ pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); - this->worker_logger->log(this->worker_logger, CONTROL, "worker thread running, pid: %d", getpid()); + this->worker_logger->log(this->worker_logger, CONTROL, "worker thread running, thread_id: %u", (int)pthread_self()); for (;;) { job_t *job; |