diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2009-03-11 13:15:43 +0000 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2009-03-11 13:15:43 +0000 |
commit | 3b950e41896219c9d21f9bc13616bfc6333b345c (patch) | |
tree | 3d53d979f3fbfa92704071ee17bafcfb15002098 /Process.h | |
parent | b93e5c00b6cad873942a2709f990a0626d98e7be (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.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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); |