summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpanikon <panikon@zoho.com>2014-07-09 03:16:46 -0300
committerpanikon <panikon@zoho.com>2014-07-09 03:16:46 -0300
commitfc41d1f9fa9f3eff21568c8111f74454793dea9c (patch)
tree7a2c96c8baea4d91e1d9b2301ef34a1da1ea2465
parentbce716fa908584f435dcf97904fb37ada6dd90b7 (diff)
downloadhercules-fc41d1f9fa9f3eff21568c8111f74454793dea9c.tar.gz
hercules-fc41d1f9fa9f3eff21568c8111f74454793dea9c.tar.bz2
hercules-fc41d1f9fa9f3eff21568c8111f74454793dea9c.tar.xz
hercules-fc41d1f9fa9f3eff21568c8111f74454793dea9c.zip
Corrected issue with bce716fa908584f435dcf97904fb37ada6dd90b7 forgot to removed a couple of parenthesis, sorry guys
-rw-r--r--src/common/sysinfo.c2
-rw-r--r--src/common/thread.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c
index 5ecb7b5ad..605256100 100644
--- a/src/common/sysinfo.c
+++ b/src/common/sysinfo.c
@@ -1040,7 +1040,7 @@ void sysinfo_defaults(void) {
#if defined(WIN32) && !defined(__CYGWIN__)
sysinfo->getpagesize = sysinfo_getpagesize;
#else
- sysinfo->getpagesize = getpagesize();
+ sysinfo->getpagesize = getpagesize;
#endif
sysinfo->platform = sysinfo_platform;
sysinfo->osversion = sysinfo_osversion;
diff --git a/src/common/thread.c b/src/common/thread.c
index b97eecb44..933ee2c0e 100644
--- a/src/common/thread.c
+++ b/src/common/thread.c
@@ -10,13 +10,13 @@
#include "thread.h"
+#include "../common/sysinfo.h" // sysinfo->getpagesize()
#include "../common/cbasetypes.h"
#include "../common/malloc.h"
#include "../common/showmsg.h"
#ifdef WIN32
# include "../common/winapi.h"
-# define getpagesize() 4096 // @TODO: implement this properly (GetSystemInfo .. dwPageSize..). (Atm as on all supported win platforms its 4k its static.)
# define __thread __declspec( thread )
#else
# include <pthread.h>
@@ -169,7 +169,7 @@ rAthread rathread_createEx( rAthreadProc entryPoint, void *param, size_t szSta
// given stacksize aligned to systems pagesize?
- tmp = szStack % getpagesize();
+ tmp = szStack % sysinfo->getpagesize();
if(tmp != 0)
szStack += tmp;