aboutsummaryrefslogtreecommitdiffstats
path: root/lib/System/Unix/SUS
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-09-11 04:54:06 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-09-11 04:54:06 +0000
commit4429b2c7fc3dd32e608c58b1d3fe931e39f3ec34 (patch)
treeb3fd20c2a382f719303913f2b72f16eb2b7b75c2 /lib/System/Unix/SUS
parent6939f8141ce40c5bf1ed5958abe29cc31919464c (diff)
downloadexternal_llvm-4429b2c7fc3dd32e608c58b1d3fe931e39f3ec34.zip
external_llvm-4429b2c7fc3dd32e608c58b1d3fe931e39f3ec34.tar.gz
external_llvm-4429b2c7fc3dd32e608c58b1d3fe931e39f3ec34.tar.bz2
Implementation of Process concept for SUSv2 platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16288 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Unix/SUS')
-rw-r--r--lib/System/Unix/SUS/Process.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/System/Unix/SUS/Process.cpp b/lib/System/Unix/SUS/Process.cpp
new file mode 100644
index 0000000..d10b88e
--- /dev/null
+++ b/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