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

Side by Side Diff: runtime/bin/signal_blocker.h

Issue 169893003: Another round of cleanups for http://www.dartbug.com/15922 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef BIN_SIGNAL_BLOCKER_H_ 5 #ifndef BIN_SIGNAL_BLOCKER_H_
6 #define BIN_SIGNAL_BLOCKER_H_ 6 #define BIN_SIGNAL_BLOCKER_H_
7 7
8 #include "platform/globals.h" 8 #include "platform/globals.h"
9 9
10 #if defined(TARGET_OS_WINDOWS) 10 #if defined(TARGET_OS_WINDOWS)
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 ASSERT(r == 0); 49 ASSERT(r == 0);
50 } 50 }
51 51
52 private: 52 private:
53 sigset_t old; 53 sigset_t old;
54 }; 54 };
55 55
56 56
57 #define TEMP_FAILURE_RETRY_BLOCK_SIGNALS(expression) \ 57 #define TEMP_FAILURE_RETRY_BLOCK_SIGNALS(expression) \
58 ({ ThreadSignalBlocker tsb(SIGPROF); \ 58 ({ ThreadSignalBlocker tsb(SIGPROF); \
59 int64_t __result; \ 59 intptr_t __result; \
60 do { \ 60 do { \
61 __result = static_cast<int64_t>(expression); \ 61 __result = (expression); \
62 } while (__result == -1L && errno == EINTR); \ 62 } while ((__result == -1L) && (errno == EINTR)); \
63 __result; }) 63 __result; })
64 64
65 #define VOID_TEMP_FAILURE_RETRY_BLOCK_SIGNALS(expression) \ 65 #define VOID_TEMP_FAILURE_RETRY_BLOCK_SIGNALS(expression) \
66 (static_cast<void>(TEMP_FAILURE_RETRY_BLOCK_SIGNALS(expression))) 66 (static_cast<void>(TEMP_FAILURE_RETRY_BLOCK_SIGNALS(expression)))
siva 2014/02/19 00:34:04 Maybe in another CL we should consider co locating
Ivan Posva 2014/02/19 04:04:23 I don't think we need both versions. Different CL.
67 67
68 } // namespace bin 68 } // namespace bin
69 } // namespace dart 69 } // namespace dart
70 70
71 #endif // BIN_SIGNAL_BLOCKER_H_ 71 #endif // BIN_SIGNAL_BLOCKER_H_
OLDNEW
« no previous file with comments | « runtime/bin/process_macos.cc ('k') | runtime/lib/mirrors.cc » ('j') | runtime/vm/snapshot.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698