diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-09-11 04:54:06 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-09-11 04:54:06 +0000 |
commit | 2d20d765d899cb3532d9b3374d87a088189e9acb (patch) | |
tree | 5bdbd88980aa1b755d1ebd6a14d1933e3cac2ac8 /llvm/lib/System/Unix/SUS/Process.cpp | |
parent | fe020a38bcd6f1f8f13d2189af95656bdd0229e9 (diff) | |
download | bcm5719-llvm-2d20d765d899cb3532d9b3374d87a088189e9acb.tar.gz bcm5719-llvm-2d20d765d899cb3532d9b3374d87a088189e9acb.zip |
Implementation of Process concept for SUSv2 platforms.
llvm-svn: 16288
Diffstat (limited to 'llvm/lib/System/Unix/SUS/Process.cpp')
-rw-r--r-- | llvm/lib/System/Unix/SUS/Process.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/llvm/lib/System/Unix/SUS/Process.cpp b/llvm/lib/System/Unix/SUS/Process.cpp new file mode 100644 index 00000000000..d10b88ecff3 --- /dev/null +++ b/llvm/lib/System/Unix/SUS/Process.cpp @@ -0,0 +1,31 @@ +//===- Unix/SUS/Process.cpp - Linux Process Implementation ---- -*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file was developed by Reid Spencer and is distributed under the +// University of Illinois Open Source License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file provides the Linux specific implementation of the Process class. +// +//===----------------------------------------------------------------------===// + +#include <unistd.h> + +//===----------------------------------------------------------------------===// +//=== WARNING: Implementation here must contain only code specific to the +//=== SUS (Single Unix Specification). +//===----------------------------------------------------------------------===// + +namespace llvm { +using namespace sys; + +unsigned +Process::GetPageSize() { + static const long page_size = sysconf(_SC_PAGE_SIZE); + return static_cast<unsigned>(page_size); +} + +} +// vim: sw=2 smartindent smarttab tw=80 autoindent expandtab |