diff options
Diffstat (limited to 'rts/posix')
-rw-r--r-- | rts/posix/GetTime.c | 2 | ||||
-rw-r--r-- | rts/posix/OSMem.c | 4 | ||||
-rw-r--r-- | rts/posix/OSThreads.c | 28 | ||||
-rw-r--r-- | rts/posix/Signals.c | 4 |
4 files changed, 19 insertions, 19 deletions
diff --git a/rts/posix/GetTime.c b/rts/posix/GetTime.c index ab0d15e129..130d3f1ca9 100644 --- a/rts/posix/GetTime.c +++ b/rts/posix/GetTime.c @@ -140,7 +140,7 @@ Time getProcessElapsedTime(void) void getProcessTimes(Time *user, Time *elapsed) { - static nat ClockFreq = 0; + static uint32_t ClockFreq = 0; if (ClockFreq == 0) { #if defined(HAVE_SYSCONF) diff --git a/rts/posix/OSMem.c b/rts/posix/OSMem.c index 20d27bec4f..a06f544874 100644 --- a/rts/posix/OSMem.c +++ b/rts/posix/OSMem.c @@ -260,7 +260,7 @@ gen_map_mblocks (W_ size) } void * -osGetMBlocks(nat n) +osGetMBlocks(uint32_t n) { caddr_t ret; W_ size = MBLOCK_SIZE * (W_)n; @@ -294,7 +294,7 @@ osGetMBlocks(nat n) return ret; } -void osFreeMBlocks(char *addr, nat n) +void osFreeMBlocks(char *addr, uint32_t n) { munmap(addr, n * MBLOCK_SIZE); } diff --git a/rts/posix/OSThreads.c b/rts/posix/OSThreads.c index 1562ee49d7..ad138d314d 100644 --- a/rts/posix/OSThreads.c +++ b/rts/posix/OSThreads.c @@ -227,10 +227,10 @@ forkOS_createThread ( HsStablePtr entry ) return result; } -nat +uint32_t getNumberOfProcessors (void) { - static nat nproc = 0; + static uint32_t nproc = 0; if (nproc == 0) { #if defined(HAVE_SYSCONF) && defined(_SC_NPROCESSORS_ONLN) @@ -238,13 +238,13 @@ getNumberOfProcessors (void) #elif defined(HAVE_SYSCONF) && defined(_SC_NPROCESSORS_CONF) nproc = sysconf(_SC_NPROCESSORS_CONF); #elif defined(darwin_HOST_OS) - size_t size = sizeof(nat); + size_t size = sizeof(uint32_t); if(sysctlbyname("hw.logicalcpu",&nproc,&size,NULL,0) != 0) { if(sysctlbyname("hw.ncpu",&nproc,&size,NULL,0) != 0) nproc = 1; } #elif defined(freebsd_HOST_OS) - size_t size = sizeof(nat); + size_t size = sizeof(uint32_t); if(sysctlbyname("hw.ncpu",&nproc,&size,NULL,0) != 0) nproc = 1; #else @@ -260,11 +260,11 @@ getNumberOfProcessors (void) // number of physical CPUs, in which case, the thread will be allowed // to run on CPU n, n+m, n+2m etc. void -setThreadAffinity (nat n, nat m) +setThreadAffinity (uint32_t n, uint32_t m) { - nat nproc; + uint32_t nproc; cpu_set_t cs; - nat i; + uint32_t i; nproc = getNumberOfProcessors(); CPU_ZERO(&cs); @@ -277,7 +277,7 @@ setThreadAffinity (nat n, nat m) #elif defined(darwin_HOST_OS) && defined(THREAD_AFFINITY_POLICY) // Schedules the current thread in the affinity set identified by tag n. void -setThreadAffinity (nat n, nat m GNUC3_ATTRIBUTE(__unused__)) +setThreadAffinity (uint32_t n, uint32_t m GNUC3_ATTRIBUTE(__unused__)) { thread_affinity_policy_data_t policy; @@ -290,11 +290,11 @@ setThreadAffinity (nat n, nat m GNUC3_ATTRIBUTE(__unused__)) #elif defined(HAVE_SYS_CPUSET_H) /* FreeBSD 7.1+ */ void -setThreadAffinity(nat n, nat m) +setThreadAffinity(uint32_t n, uint32_t m) { - nat nproc; + uint32_t nproc; cpuset_t cs; - nat i; + uint32_t i; nproc = getNumberOfProcessors(); CPU_ZERO(&cs); @@ -308,8 +308,8 @@ setThreadAffinity(nat n, nat m) #else void -setThreadAffinity (nat n GNUC3_ATTRIBUTE(__unused__), - nat m GNUC3_ATTRIBUTE(__unused__)) +setThreadAffinity (uint32_t n GNUC3_ATTRIBUTE(__unused__), + uint32_t m GNUC3_ATTRIBUTE(__unused__)) { } #endif @@ -328,7 +328,7 @@ forkOS_createThread ( HsStablePtr entry STG_UNUSED ) return -1; } -nat getNumberOfProcessors (void) +uint32_t getNumberOfProcessors (void) { return 1; } diff --git a/rts/posix/Signals.c b/rts/posix/Signals.c index 7fb854b894..496ec7b2df 100644 --- a/rts/posix/Signals.c +++ b/rts/posix/Signals.c @@ -65,7 +65,7 @@ HsInt nocldstop = 0; StgInt *signal_handlers = NULL; /* Dynamically grown array of signal handlers */ static StgInt nHandlers = 0; /* Size of handlers array */ -static nat n_haskell_handlers = 0; +static uint32_t n_haskell_handlers = 0; static sigset_t userSignals; static sigset_t savedSignals; @@ -185,7 +185,7 @@ void ioManagerDie (void) { StgWord8 byte = (StgWord8)IO_MANAGER_DIE; - nat i; + uint32_t i; int fd; int r; |