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

Side by Side Diff: lib/Support/Unix/Watchdog.inc

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 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
« no previous file with comments | « lib/Support/Unix/TimeValue.inc ('k') | lib/Target/ARM/ARM.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===--- Unix/Watchdog.inc - Unix Watchdog Implementation -------*- C++ -*-===// 1 //===--- Unix/Watchdog.inc - Unix Watchdog Implementation -------*- C++ -*-===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This file provides the generic Unix implementation of the Watchdog class. 10 // This file provides the generic Unix implementation of the Watchdog class.
11 // 11 //
12 //===----------------------------------------------------------------------===// 12 //===----------------------------------------------------------------------===//
13 13
14 #ifdef HAVE_UNISTD_H 14 #ifdef HAVE_UNISTD_H
15 #include <unistd.h> 15 #include <unistd.h>
16 #endif 16 #endif
17 17
18 namespace llvm { 18 namespace llvm {
19 namespace sys { 19 namespace sys {
20 Watchdog::Watchdog(unsigned int seconds) { 20 Watchdog::Watchdog(unsigned int seconds) {
21 #ifdef HAVE_UNISTD_H 21 #ifdef HAVE_UNISTD_H
22 #ifndef __native_client__
22 alarm(seconds); 23 alarm(seconds);
24 #endif // __native_client__
23 #endif 25 #endif
24 } 26 }
25 27
26 Watchdog::~Watchdog() { 28 Watchdog::~Watchdog() {
27 #ifdef HAVE_UNISTD_H 29 #ifdef HAVE_UNISTD_H
30 #ifndef __native_client__
28 alarm(0); 31 alarm(0);
32 #endif //__native_client__
29 #endif 33 #endif
30 } 34 }
31 } 35 }
32 } 36 }
OLDNEW
« no previous file with comments | « lib/Support/Unix/TimeValue.inc ('k') | lib/Target/ARM/ARM.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698