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

Side by Side Diff: mojo/public/cpp/utility/lib/run_loop.cc

Issue 2229573002: Change the canonical way to include the C macros.h to <mojo/macros.h>. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 4 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/public/cpp/utility/BUILD.gn ('k') | mojo/public/tools/bindings/mojom.gni » ('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 #include "mojo/public/cpp/utility/run_loop.h" 5 #include "mojo/public/cpp/utility/run_loop.h"
6 6
7 #include <assert.h> 7 #include <assert.h>
8 #include <mojo/macros.h>
8 #include <pthread.h> 9 #include <pthread.h>
9 10
10 #include <algorithm> 11 #include <algorithm>
11 #include <limits> 12 #include <limits>
12 #include <utility> 13 #include <utility>
13 #include <vector> 14 #include <vector>
14 15
15 #include "mojo/public/c/system/macros.h"
16 #include "mojo/public/cpp/system/time.h" 16 #include "mojo/public/cpp/system/time.h"
17 #include "mojo/public/cpp/system/wait.h" 17 #include "mojo/public/cpp/system/wait.h"
18 #include "mojo/public/cpp/utility/run_loop_handler.h" 18 #include "mojo/public/cpp/utility/run_loop_handler.h"
19 19
20 namespace mojo { 20 namespace mojo {
21 namespace { 21 namespace {
22 22
23 // The initial and maximum number of results that we'll accept from 23 // The initial and maximum number of results that we'll accept from
24 // |WaitSetWait()|. TODO(vtl): I just made up these numbers. 24 // |WaitSetWait()|. TODO(vtl): I just made up these numbers.
25 constexpr uint32_t kInitialWaitSetNumResults = 16u; 25 constexpr uint32_t kInitialWaitSetNumResults = 16u;
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 handler->OnHandleError(id, MOJO_RESULT_DEADLINE_EXCEEDED); 387 handler->OnHandleError(id, MOJO_RESULT_DEADLINE_EXCEEDED);
388 did_work = true; 388 did_work = true;
389 389
390 if (current_run_state_->should_quit) 390 if (current_run_state_->should_quit)
391 break; 391 break;
392 } 392 }
393 return did_work; 393 return did_work;
394 } 394 }
395 395
396 } // namespace mojo 396 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/utility/BUILD.gn ('k') | mojo/public/tools/bindings/mojom.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698