mirror of
https://github.com/FriendsOfPHP/uprofiler.git
synced 2026-03-24 00:22:07 +01:00
fix 64bit support on windows (partial, stil horrible casting happening, no garantee to get the right cpu id, and most likely on some other platform as well
This commit is contained in:
@@ -81,9 +81,10 @@ extern zend_module_entry uprofiler_module_entry;
|
||||
* Patch for compiling in Win32/64
|
||||
* @author Benjamin Carl <opensource@clickalicious.de>
|
||||
*/
|
||||
# define cpu_set_t PDWORD_PTR
|
||||
# define CPU_SET(cpu_id, new_mask) (*(new_mask)) = (cpu_id + 1)
|
||||
# define CPU_ZERO(new_mask) (*(new_mask)) = 0
|
||||
# define SET_AFFINITY(pid, size, mask) SetProcessAffinityMask(GetCurrentProcess(), (DWORD_PTR)mask)
|
||||
# define SET_AFFINITY(pid, size, mask) SetProcessAffinityMask(GetCurrentProcess(), mask)
|
||||
# define GET_AFFINITY(pid, size, mask) \
|
||||
GetProcessAffinityMask(GetCurrentProcess(), mask, &s_mask)
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user