OLD | NEW |
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_SYSTEM_HANDLE_SIGNALS_STATE_H_ | 5 #ifndef MOJO_SYSTEM_HANDLE_SIGNALS_STATE_H_ |
6 #define MOJO_SYSTEM_HANDLE_SIGNALS_STATE_H_ | 6 #define MOJO_SYSTEM_HANDLE_SIGNALS_STATE_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "mojo/public/c/system/types.h" | 9 #include "mojo/public/c/system/types.h" |
10 #include "mojo/system/system_impl_export.h" | 10 #include "mojo/system/system_impl_export.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 bool satisfies(MojoHandleSignals signals) const { | 34 bool satisfies(MojoHandleSignals signals) const { |
35 return !!(satisfied_signals & signals); | 35 return !!(satisfied_signals & signals); |
36 } | 36 } |
37 | 37 |
38 bool can_satisfy(MojoHandleSignals signals) const { | 38 bool can_satisfy(MojoHandleSignals signals) const { |
39 return !!(satisfiable_signals & signals); | 39 return !!(satisfiable_signals & signals); |
40 } | 40 } |
41 | 41 |
42 // (Copy and assignment allowed.) | 42 // (Copy and assignment allowed.) |
43 }; | 43 }; |
44 COMPILE_ASSERT(sizeof(HandleSignalsState) == sizeof(MojoHandleSignalsState), | 44 static_assert(sizeof(HandleSignalsState) == sizeof(MojoHandleSignalsState), |
45 HandleSignalsState_should_add_no_overhead); | 45 "HandleSignalsState should add no overhead"); |
46 | 46 |
47 } // namespace system | 47 } // namespace system |
48 } // namespace mojo | 48 } // namespace mojo |
49 | 49 |
50 #endif // MOJO_SYSTEM_HANDLE_SIGNALS_STATE_H_ | 50 #endif // MOJO_SYSTEM_HANDLE_SIGNALS_STATE_H_ |
OLD | NEW |