Reid Spencer | b13cf98 | 2005-12-22 03:23:46 +0000 | [diff] [blame] | 1 | //===-- Alarm.inc - Implement Win32 Alarm Support -------------------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file was developed by the Reid Spencer and is distributed under the |
| 6 | // University of Illinois Open Source License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file implements the Win32 Alarm support. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #include <cassert> |
| 15 | using namespace llvm; |
| 16 | |
| 17 | /// NestedSOI - Sanity check. Alarms cannot be nested or run in parallel. |
| 18 | /// This ensures that they never do. |
| 19 | static bool NestedSOI = false; |
| 20 | |
| 21 | void sys::SetupAlarm(unsigned seconds) { |
| 22 | assert(!NestedSOI && "sys::SetupAlarm calls cannot be nested!"); |
| 23 | NestedSOI = true; |
| 24 | // FIXME: Implement for Win32 |
| 25 | } |
| 26 | |
| 27 | void sys::TerminateAlarm() { |
| 28 | assert(NestedSOI && "sys::TerminateAlarm called without sys::SetupAlarm!"); |
| 29 | // FIXME: Implement for Win32 |
| 30 | NestedSOI = false; |
| 31 | } |
| 32 | |
| 33 | int sys::AlarmStatus() { |
| 34 | // FIXME: Implement for Win32 |
| 35 | return 0; |
| 36 | } |