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

Side by Side Diff: mojo/edk/system/shared_buffer_dispatcher.h

Issue 2093763002: Implement WaitSetDispatcher::WaitSetWaitImpl(). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: doh Created 4 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
« no previous file with comments | « mojo/edk/system/memory.cc ('k') | mojo/edk/system/wait_set_dispatcher.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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef MOJO_EDK_SYSTEM_SHARED_BUFFER_DISPATCHER_H_ 5 #ifndef MOJO_EDK_SYSTEM_SHARED_BUFFER_DISPATCHER_H_
6 #define MOJO_EDK_SYSTEM_SHARED_BUFFER_DISPATCHER_H_ 6 #define MOJO_EDK_SYSTEM_SHARED_BUFFER_DISPATCHER_H_
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "mojo/edk/system/memory.h" 10 #include "mojo/edk/system/memory.h"
(...skipping 14 matching lines...) Expand all
25 class PlatformSharedBufferMapping; 25 class PlatformSharedBufferMapping;
26 } 26 }
27 27
28 namespace system { 28 namespace system {
29 29
30 // TODO(vtl): We derive from SimpleDispatcher, even though we don't currently 30 // TODO(vtl): We derive from SimpleDispatcher, even though we don't currently
31 // have anything that's waitable. I want to add a "transferrable" wait flag 31 // have anything that's waitable. I want to add a "transferrable" wait flag
32 // (which would entail overriding |GetHandleSignalsStateImplNoLock()|, etc.). 32 // (which would entail overriding |GetHandleSignalsStateImplNoLock()|, etc.).
33 class SharedBufferDispatcher final : public SimpleDispatcher { 33 class SharedBufferDispatcher final : public SimpleDispatcher {
34 public: 34 public:
35 // The default/standard rights for a shared buffer handle. Note that they're 35 // The default/standard rights for a shared buffer handle. Note that shared
36 // duplicatable by default. 36 // buffer handles are duplicatable by default.
37 static constexpr MojoHandleRights kDefaultHandleRights = 37 static constexpr MojoHandleRights kDefaultHandleRights =
38 MOJO_HANDLE_RIGHT_DUPLICATE | MOJO_HANDLE_RIGHT_TRANSFER | 38 MOJO_HANDLE_RIGHT_DUPLICATE | MOJO_HANDLE_RIGHT_TRANSFER |
39 MOJO_HANDLE_RIGHT_GET_OPTIONS | MOJO_HANDLE_RIGHT_SET_OPTIONS | 39 MOJO_HANDLE_RIGHT_GET_OPTIONS | MOJO_HANDLE_RIGHT_SET_OPTIONS |
40 MOJO_HANDLE_RIGHT_MAP_READABLE | MOJO_HANDLE_RIGHT_MAP_WRITABLE | 40 MOJO_HANDLE_RIGHT_MAP_READABLE | MOJO_HANDLE_RIGHT_MAP_WRITABLE |
41 MOJO_HANDLE_RIGHT_MAP_EXECUTABLE; 41 MOJO_HANDLE_RIGHT_MAP_EXECUTABLE;
42 42
43 // The default options to use for |MojoCreateSharedBuffer()|. (Real uses 43 // The default options to use for |MojoCreateSharedBuffer()|. (Real uses
44 // should obtain this via |ValidateCreateOptions()| with a null |in_options|; 44 // should obtain this via |ValidateCreateOptions()| with a null |in_options|;
45 // this is exposed directly for testing convenience.) 45 // this is exposed directly for testing convenience.)
46 static const MojoCreateSharedBufferOptions kDefaultCreateOptions; 46 static const MojoCreateSharedBufferOptions kDefaultCreateOptions;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 util::RefPtr<platform::PlatformSharedBuffer> shared_buffer_ 125 util::RefPtr<platform::PlatformSharedBuffer> shared_buffer_
126 MOJO_GUARDED_BY(mutex()); 126 MOJO_GUARDED_BY(mutex());
127 127
128 MOJO_DISALLOW_COPY_AND_ASSIGN(SharedBufferDispatcher); 128 MOJO_DISALLOW_COPY_AND_ASSIGN(SharedBufferDispatcher);
129 }; 129 };
130 130
131 } // namespace system 131 } // namespace system
132 } // namespace mojo 132 } // namespace mojo
133 133
134 #endif // MOJO_EDK_SYSTEM_SHARED_BUFFER_DISPATCHER_H_ 134 #endif // MOJO_EDK_SYSTEM_SHARED_BUFFER_DISPATCHER_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/memory.cc ('k') | mojo/edk/system/wait_set_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698