Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Unified Diff: native_client_sdk/src/libraries/sdk_util/thread_pool.h

Issue 18644009: [NaCl SDK] Upate atomic ops in nacl_io (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 'Move comment to correct location' Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: native_client_sdk/src/libraries/sdk_util/thread_pool.h
diff --git a/native_client_sdk/src/libraries/sdk_util/thread_pool.h b/native_client_sdk/src/libraries/sdk_util/thread_pool.h
index 760b3f715db0fea044eae27bccf622ebad52994e..7482347f5dbf0ce6dffbe3745ae2e8db7908cb59 100644
--- a/native_client_sdk/src/libraries/sdk_util/thread_pool.h
+++ b/native_client_sdk/src/libraries/sdk_util/thread_pool.h
@@ -10,6 +10,8 @@
#include <pthread.h>
#include <semaphore.h>
+#include "sdk_util/atomicops.h"
+
// typdef helper for work function
typedef void (*WorkFunction)(int task_index, void* data);
@@ -33,7 +35,7 @@ class ThreadPool {
static void* WorkerThreadEntry(void* data);
void PostExitAndJoinAll();
pthread_t* threads_;
- int counter_;
+ Atomic32 counter_;
const int num_threads_;
bool exiting_;
void* user_data_;

Powered by Google App Engine
This is Rietveld 408576698