summaryrefslogtreecommitdiffstats
path: root/Process.h
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2009-03-11 13:15:43 +0000
committerHisham Muhammad <hisham@gobolinux.org>2009-03-11 13:15:43 +0000
commit3b950e41896219c9d21f9bc13616bfc6333b345c (patch)
tree3d53d979f3fbfa92704071ee17bafcfb15002098 /Process.h
parentb93e5c00b6cad873942a2709f990a0626d98e7be (diff)
BSD related fixes:
* BUGFIX: Correct page size calculation for FreeBSD systems (thanks to Andrew Paulsen) * Allow compilation without PLPA on systems that don't support it (thanks to Timothy Redaelli)
Diffstat (limited to 'Process.h')
-rw-r--r--Process.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/Process.h b/Process.h
index 54dbf87f..620eb75a 100644
--- a/Process.h
+++ b/Process.h
@@ -31,13 +31,16 @@ in the source distribution for its full text.
#include <pwd.h>
#include <sched.h>
+#ifdef HAVE_PLPA
#include <plpa.h>
+#endif
// This works only with glibc 2.1+. On earlier versions
// the behavior is similar to have a hardcoded page size.
#ifndef PAGE_SIZE
-#define PAGE_SIZE ( sysconf(_SC_PAGESIZE) / 1024 )
+#define PAGE_SIZE ( sysconf(_SC_PAGESIZE) )
#endif
+#define PAGE_SIZE_KB ( PAGE_SIZE / ONE_K )
#define PROCESS_COMM_LEN 300
@@ -172,9 +175,11 @@ void Process_toggleTag(Process* this);
bool Process_setPriority(Process* this, int priority);
+#ifdef HAVE_PLPA
unsigned long Process_getAffinity(Process* this);
bool Process_setAffinity(Process* this, unsigned long mask);
+#endif
void Process_sendSignal(Process* this, int signal);

© 2014-2024 Faster IT GmbH | imprint | privacy policy