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

Unified Diff: webrtc/base/task_queue_posix.h

Issue 1984503002: Reland of New task queueing primitive for async tasks: TaskQueue. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Optional initialization for build_for Created 4 years, 7 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: webrtc/base/task_queue_posix.h
diff --git a/webrtc/base/logging_mac.mm b/webrtc/base/task_queue_posix.h
similarity index 52%
copy from webrtc/base/logging_mac.mm
copy to webrtc/base/task_queue_posix.h
index ffee3541a48245e0179670ce2b013f957bc6b88a..b677b78a38cfb68de2c314bbc54c9ef64d58d82f 100644
--- a/webrtc/base/logging_mac.mm
+++ b/webrtc/base/task_queue_posix.h
@@ -8,15 +8,29 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/base/logging.h"
-
-#import <Foundation/Foundation.h>
+#ifndef WEBRTC_BASE_TASK_QUEUE_POSIX_H_
+#define WEBRTC_BASE_TASK_QUEUE_POSIX_H_
+#include <pthread.h>
namespace rtc {
-std::string DescriptionFromOSStatus(OSStatus err) {
- NSError* error =
- [NSError errorWithDomain:NSOSStatusErrorDomain code:err userInfo:nil];
- return error.description.UTF8String;
-}
+
+class TaskQueue;
+
+namespace internal {
+
+class AutoSetCurrentQueuePtr {
+ public:
+ explicit AutoSetCurrentQueuePtr(TaskQueue* q);
+ ~AutoSetCurrentQueuePtr();
+
+ private:
+ TaskQueue* const prev_;
+};
+
+pthread_key_t GetQueuePtrTls();
+
+} // namespace internal
} // namespace rtc
+
+#endif // WEBRTC_BASE_TASK_QUEUE_POSIX_H_

Powered by Google App Engine
This is Rietveld 408576698