Reid Spencer | 4429b2c | 2004-09-11 04:54:06 +0000 | [diff] [blame] | 1 | //===- Unix/SUS/Process.cpp - Linux Process Implementation ---- -*- C++ -*-===// |
Misha Brukman | f976c85 | 2005-04-21 22:55:34 +0000 | [diff] [blame] | 2 | // |
Reid Spencer | 4429b2c | 2004-09-11 04:54:06 +0000 | [diff] [blame] | 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Misha Brukman | f976c85 | 2005-04-21 22:55:34 +0000 | [diff] [blame] | 5 | // This file was developed by Reid Spencer and is distributed under the |
Reid Spencer | 4429b2c | 2004-09-11 04:54:06 +0000 | [diff] [blame] | 6 | // University of Illinois Open Source License. See LICENSE.TXT for details. |
Misha Brukman | f976c85 | 2005-04-21 22:55:34 +0000 | [diff] [blame] | 7 | // |
Reid Spencer | 4429b2c | 2004-09-11 04:54:06 +0000 | [diff] [blame] | 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file provides the Linux specific implementation of the Process class. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #include <unistd.h> |
| 15 | |
| 16 | //===----------------------------------------------------------------------===// |
Misha Brukman | f976c85 | 2005-04-21 22:55:34 +0000 | [diff] [blame] | 17 | //=== WARNING: Implementation here must contain only code specific to the |
Reid Spencer | 4429b2c | 2004-09-11 04:54:06 +0000 | [diff] [blame] | 18 | //=== SUS (Single Unix Specification). |
| 19 | //===----------------------------------------------------------------------===// |
| 20 | |
| 21 | namespace llvm { |
| 22 | using namespace sys; |
| 23 | |
Misha Brukman | f976c85 | 2005-04-21 22:55:34 +0000 | [diff] [blame] | 24 | unsigned |
Reid Spencer | 4429b2c | 2004-09-11 04:54:06 +0000 | [diff] [blame] | 25 | Process::GetPageSize() { |
| 26 | static const long page_size = sysconf(_SC_PAGE_SIZE); |
| 27 | return static_cast<unsigned>(page_size); |
| 28 | } |
| 29 | |
| 30 | } |