LLVM API Documentation

Alarm.inc

Go to the documentation of this file.
00001 //===-- Alarm.inc - Implement Win32 Alarm Support -------------------------===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file was developed by the Reid Spencer and is distributed under the
00006 // University of Illinois Open Source License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This file implements the Win32 Alarm support.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #include <cassert>
00015 using namespace llvm;
00016 
00017 /// NestedSOI - Sanity check.  Alarms cannot be nested or run in parallel.  
00018 /// This ensures that they never do.
00019 static bool NestedSOI = false;
00020 
00021 void sys::SetupAlarm(unsigned seconds) {
00022   assert(!NestedSOI && "sys::SetupAlarm calls cannot be nested!");
00023   NestedSOI = true;
00024   // FIXME: Implement for Win32
00025 }
00026 
00027 void sys::TerminateAlarm() {
00028   assert(NestedSOI && "sys::TerminateAlarm called without sys::SetupAlarm!");
00029   // FIXME: Implement for Win32
00030   NestedSOI = false;
00031 }
00032 
00033 int sys::AlarmStatus() {
00034   // FIXME: Implement for Win32
00035   return 0;
00036 }