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

Side by Side Diff: include/private/SkSemaphore.h

Issue 1369333004: Move SkAtomics.h to private. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « include/private/SkOncePtr.h ('k') | include/private/SkWeakRefCnt.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkSemaphore_DEFINED 8 #ifndef SkSemaphore_DEFINED
9 #define SkSemaphore_DEFINED 9 #define SkSemaphore_DEFINED
10 10
11 #include "SkTypes.h" 11 #include "SkTypes.h"
12 #include "SkAtomics.h" 12 #include "../private/SkAtomics.h"
13 #include "../private/SkOncePtr.h" 13 #include "../private/SkOncePtr.h"
14 14
15 struct SkBaseSemaphore { 15 struct SkBaseSemaphore {
16 16
17 // Increment the counter by 1. 17 // Increment the counter by 1.
18 // This is a specialization for supporting SkMutex. 18 // This is a specialization for supporting SkMutex.
19 void signal() { 19 void signal() {
20 // Since this fetches the value before the add, 0 indicates that this th read is running and 20 // Since this fetches the value before the add, 0 indicates that this th read is running and
21 // no threads are waiting, -1 and below means that threads are waiting, but only signal 1 21 // no threads are waiting, -1 and below means that threads are waiting, but only signal 1
22 // thread to run. 22 // thread to run.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 void wait(); 78 void wait();
79 79
80 void signal(int n = 1); 80 void signal(int n = 1);
81 81
82 private: 82 private:
83 SkBaseSemaphore fBaseSemaphore; 83 SkBaseSemaphore fBaseSemaphore;
84 }; 84 };
85 85
86 #endif//SkSemaphore_DEFINED 86 #endif//SkSemaphore_DEFINED
OLDNEW
« no previous file with comments | « include/private/SkOncePtr.h ('k') | include/private/SkWeakRefCnt.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698