~ubuntu-branches/ubuntu/feisty/clamav/feisty

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/lib/System/Win32/Alarm.inc

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2007-02-20 10:33:44 UTC
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: james.westby@ubuntu.com-20070220103344-zgcu2psnx9d98fpa
Tags: upstream-0.90
ImportĀ upstreamĀ versionĀ 0.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//===-- Alarm.inc - Implement Win32 Alarm Support ---------------*- C++ -*-===//
2
 
//
3
 
//                     The LLVM Compiler Infrastructure
4
 
//
5
 
// This file is distributed under the University of Illinois Open Source
6
 
// 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
 
}
37
 
 
38
 
// Don't pull in all of the Windows headers.
39
 
extern "C"  void __stdcall Sleep(unsigned long);
40
 
 
41
 
void sys::Sleep(unsigned n) {
42
 
  ::Sleep(n*1000);
43
 
}