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

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

Issue 2056763003: EDK: Change Awakable::Awake()'s context, etc., to be a uint64_t. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: doh Created 4 years, 6 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/awakable.h ('k') | mojo/edk/system/awakable_list.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_AWAKABLE_LIST_H_ 5 #ifndef MOJO_EDK_SYSTEM_AWAKABLE_LIST_H_
6 #define MOJO_EDK_SYSTEM_AWAKABLE_LIST_H_ 6 #define MOJO_EDK_SYSTEM_AWAKABLE_LIST_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 14 matching lines...) Expand all
25 // is owned by the secondary object (see simple_dispatcher.* and the explanatory 25 // is owned by the secondary object (see simple_dispatcher.* and the explanatory
26 // comment in core.cc). This class is thread-unsafe (all concurrent access must 26 // comment in core.cc). This class is thread-unsafe (all concurrent access must
27 // be protected by some lock). 27 // be protected by some lock).
28 class AwakableList { 28 class AwakableList {
29 public: 29 public:
30 AwakableList(); 30 AwakableList();
31 ~AwakableList(); 31 ~AwakableList();
32 32
33 void AwakeForStateChange(const HandleSignalsState& state); 33 void AwakeForStateChange(const HandleSignalsState& state);
34 void CancelAll(); 34 void CancelAll();
35 void Add(Awakable* awakable, MojoHandleSignals signals, uint32_t context); 35 void Add(Awakable* awakable, MojoHandleSignals signals, uint64_t context);
36 void Remove(Awakable* awakable); 36 void Remove(Awakable* awakable);
37 37
38 private: 38 private:
39 struct AwakeInfo { 39 struct AwakeInfo {
40 AwakeInfo(Awakable* awakable, MojoHandleSignals signals, uint32_t context) 40 AwakeInfo(Awakable* awakable, MojoHandleSignals signals, uint64_t context)
41 : awakable(awakable), signals(signals), context(context) {} 41 : awakable(awakable), signals(signals), context(context) {}
42 42
43 Awakable* awakable; 43 Awakable* awakable;
44 MojoHandleSignals signals; 44 MojoHandleSignals signals;
45 uint32_t context; 45 uint64_t context;
46 }; 46 };
47 using AwakeInfoList = std::vector<AwakeInfo>; 47 using AwakeInfoList = std::vector<AwakeInfo>;
48 48
49 AwakeInfoList awakables_; 49 AwakeInfoList awakables_;
50 50
51 MOJO_DISALLOW_COPY_AND_ASSIGN(AwakableList); 51 MOJO_DISALLOW_COPY_AND_ASSIGN(AwakableList);
52 }; 52 };
53 53
54 } // namespace system 54 } // namespace system
55 } // namespace mojo 55 } // namespace mojo
56 56
57 #endif // MOJO_EDK_SYSTEM_AWAKABLE_LIST_H_ 57 #endif // MOJO_EDK_SYSTEM_AWAKABLE_LIST_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/awakable.h ('k') | mojo/edk/system/awakable_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698