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

Side by Side Diff: native_client_sdk/src/libraries/sdk_util/ref_object.h

Issue 19717004: [NaCl SDK] Add nacl_io and sdk_util namespaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bad copyright in mount_mem 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 */ 4 */
5 5
6 #ifndef LIBRARIES_SDK_UTIL_REF_OBJECT 6 #ifndef LIBRARIES_SDK_UTIL_REF_OBJECT
7 #define LIBRARIES_SDK_UTIL_REF_OBJECT 7 #define LIBRARIES_SDK_UTIL_REF_OBJECT
8 8
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include "pthread.h" 10 #include "pthread.h"
11 11
12 #include "sdk_util/atomicops.h" 12 #include "sdk_util/atomicops.h"
13 13
14 namespace sdk_util {
15
14 class ScopedRefBase; 16 class ScopedRefBase;
15 17
16 /* 18 /*
17 * RefObject 19 * RefObject
18 * 20 *
19 * A reference counted object. RefObjects should only be handled by ScopedRef 21 * A reference counted object. RefObjects should only be handled by ScopedRef
20 * objects. 22 * objects.
21 * 23 *
22 * When the object is first created, it has a reference count of zero. It's 24 * When the object is first created, it has a reference count of zero. It's
23 * first incremented when it gets assigned to a ScopedRef. When the last 25 * first incremented when it gets assigned to a ScopedRef. When the last
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 62 }
61 return true; 63 return true;
62 } 64 }
63 65
64 private: 66 private:
65 Atomic32 ref_count_; 67 Atomic32 ref_count_;
66 68
67 friend class ScopedRefBase; 69 friend class ScopedRefBase;
68 }; 70 };
69 71
72 } // namespace sdk_util
73
70 #endif // LIBRARIES_SDK_UTIL_REF_OBJECT 74 #endif // LIBRARIES_SDK_UTIL_REF_OBJECT
71 75
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/sdk_util/auto_lock.h ('k') | native_client_sdk/src/libraries/sdk_util/scoped_ref.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698