diff options
author | Drew Richardson <drew.richardson@arm.com> | 2013-12-16 12:00:00 -0800 |
---|---|---|
committer | Drew Richardson <drew.richardson@arm.com> | 2014-12-19 15:48:40 -0800 |
commit | 9b0375410d73fb0de515ee33e0dd7f054cd45a6f (patch) | |
tree | 6a2a9dfa45fe1a25b0959f10401e200687fd1a03 /daemon/Child.cpp | |
parent | df48c99f8da89ef9a91fac638b8e0528507bd088 (diff) |
gator: Version 5.175.17
Signed-off-by: Drew Richardson <drew.richardson@arm.com>
Diffstat (limited to 'daemon/Child.cpp')
-rw-r--r-- | daemon/Child.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/daemon/Child.cpp b/daemon/Child.cpp index c054076..9ee2ef8 100644 --- a/daemon/Child.cpp +++ b/daemon/Child.cpp @@ -86,7 +86,7 @@ static void child_handler(int signum) { } } -static void* durationThread(void* pVoid) { +static void *durationThread(void *) { prctl(PR_SET_NAME, (unsigned long)&"gatord-duration", 0, 0, 0); sem_wait(&startProfile); if (gSessionData->mSessionIsActive) { @@ -102,7 +102,7 @@ static void* durationThread(void* pVoid) { return 0; } -static void* stopThread(void* pVoid) { +static void *stopThread(void *) { OlySocket* socket = child->socket; prctl(PR_SET_NAME, (unsigned long)&"gatord-stopper", 0, 0, 0); @@ -139,7 +139,7 @@ static void* stopThread(void* pVoid) { return 0; } -void* countersThread(void* pVoid) { +static void *countersThread(void *) { prctl(PR_SET_NAME, (unsigned long)&"gatord-counters", 0, 0, 0); gSessionData->hwmon.start(); @@ -192,7 +192,7 @@ void* countersThread(void* pVoid) { return NULL; } -static void* senderThread(void* pVoid) { +static void *senderThread(void *) { int length = 1; char* data; char end_sequence[] = {RESPONSE_APC_DATA, 0, 0, 0, 0}; @@ -340,7 +340,8 @@ void Child::run() { thread_creation_success = false; } - if (gSessionData->hwmon.countersEnabled()) { + bool startcountersThread = gSessionData->hwmon.countersEnabled(); + if (startcountersThread) { if (pthread_create(&countersThreadID, NULL, countersThread, this)) { thread_creation_success = false; } @@ -378,7 +379,7 @@ void Child::run() { } while (bytesCollected > 0); logg->logMessage("Exit collect data loop"); - if (gSessionData->hwmon.countersEnabled()) { + if (startcountersThread) { pthread_join(countersThreadID, NULL); } |