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

Unified Diff: mojo/edk/system/waiter.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/edk/system/waiter.h ('k') | mojo/edk/system/waiter_test_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/waiter.cc
diff --git a/mojo/edk/system/waiter.cc b/mojo/edk/system/waiter.cc
index cfebe1c8d5ddc4afcab439ed7f3d00677056a367..0fc8b6c543d04354834dae5b873f1f1644d3fe7d 100644
--- a/mojo/edk/system/waiter.cc
+++ b/mojo/edk/system/waiter.cc
@@ -20,11 +20,10 @@ Waiter::Waiter()
#endif
awoken_(false),
awake_result_(MOJO_RESULT_INTERNAL),
- awake_context_(static_cast<uint32_t>(-1)) {
+ awake_context_(static_cast<uint64_t>(-1)) {
}
-Waiter::~Waiter() {
-}
+Waiter::~Waiter() {}
void Waiter::Init() {
#ifndef NDEBUG
@@ -37,7 +36,7 @@ void Waiter::Init() {
}
// TODO(vtl): Fast-path the |deadline == 0| case?
-MojoResult Waiter::Wait(MojoDeadline deadline, uint32_t* context) {
+MojoResult Waiter::Wait(MojoDeadline deadline, uint64_t* context) {
MutexLocker locker(&mutex_);
#ifndef NDEBUG
@@ -50,7 +49,7 @@ MojoResult Waiter::Wait(MojoDeadline deadline, uint32_t* context) {
if (awoken_) {
DCHECK_NE(awake_result_, MOJO_RESULT_INTERNAL);
if (context)
- *context = static_cast<uint32_t>(awake_context_);
+ *context = awake_context_;
return awake_result_;
}
@@ -88,11 +87,11 @@ MojoResult Waiter::Wait(MojoDeadline deadline, uint32_t* context) {
DCHECK_NE(awake_result_, MOJO_RESULT_INTERNAL);
if (context)
- *context = static_cast<uint32_t>(awake_context_);
+ *context = awake_context_;
return awake_result_;
}
-bool Waiter::Awake(MojoResult result, uintptr_t context) {
+bool Waiter::Awake(MojoResult result, uint64_t context) {
MutexLocker locker(&mutex_);
if (awoken_)
« no previous file with comments | « mojo/edk/system/waiter.h ('k') | mojo/edk/system/waiter_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698