Browse Source

Merge pull request #1843 from martin-frbg/aix_numprocs

Add get_num_procs implementation for AIX
tags/v0.3.4
Martin Kroeker GitHub 7 years ago
parent
commit
f5595d0262
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 26 additions and 0 deletions
  1. +26
    -0
      driver/others/memory.c

+ 26
- 0
driver/others/memory.c View File

@@ -259,6 +259,16 @@ int get_num_procs(void) {
}
#endif

#ifdef OS_AIX
int get_num_procs(void) {
static int nums = 0;
if (!nums) nums = sysconf(_SC_NPROCESSORS_CONF);
return nums;
}
#endif



#ifdef OS_WINDOWS

int get_num_procs(void) {
@@ -1738,6 +1748,22 @@ int get_num_procs(void) {
return nums;
}
#endif
#ifdef OS_HAIKU
int get_num_procs(void) {
static int nums = 0;
if (!nums) nums = sysconf(_SC_NPROCESSORS_CONF);
return nums;
}
#endif

#ifdef OS_AIX
int get_num_procs(void) {
static int nums = 0;
if (!nums) nums = sysconf(_SC_NPROCESSORS_CONF);
return nums;
}
#endif

#ifdef OS_WINDOWS



Loading…
Cancel
Save