Skip to content
This repository has been archived by the owner on Jan 28, 2023. It is now read-only.

Commit

Permalink
Fix broken build by PR#255.
Browse files Browse the repository at this point in the history
Signed-off-by: Colin Xu <colin.xu@intel.com>
  • Loading branch information
coxuintel committed Dec 26, 2019
1 parent a797927 commit ea1a80e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion include/hax.h
Expand Up @@ -218,6 +218,8 @@ void hax_unmap_page(struct hax_page *page);
void hax_log(int level, const char *fmt, ...); void hax_log(int level, const char *fmt, ...);
void hax_panic(const char *fmt, ...); void hax_panic(const char *fmt, ...);


uint32_t hax_cpu_id(void);

#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
Expand Down Expand Up @@ -315,7 +317,6 @@ static inline bool cpu_is_online(hax_cpumap_t *cpu_map, uint32_t cpu_id)
return !!(((hax_cpumask_t)1 << bit) & map); return !!(((hax_cpumask_t)1 << bit) & map);
} }


extern uint32_t hax_cpu_id(void);
static inline void get_online_map(void *param) static inline void get_online_map(void *param)
{ {
hax_cpumap_t *omap = (hax_cpumap_t *)param; hax_cpumap_t *omap = (hax_cpumap_t *)param;
Expand Down
4 changes: 2 additions & 2 deletions platforms/darwin/hax_wrapper.cpp
Expand Up @@ -78,8 +78,8 @@ extern "C" void hax_panic(const char *fmt, ...)
va_end(args); va_end(args);
} }


extern int cpu_number(void); extern "C" int cpu_number(void);
inline uint32_t hax_cpu_id(void) extern "C" uint32_t hax_cpu_id(void)
{ {
return (uint32_t)cpu_number(); return (uint32_t)cpu_number();
} }
Expand Down
2 changes: 1 addition & 1 deletion platforms/linux/hax_wrapper.c
Expand Up @@ -81,7 +81,7 @@ void hax_panic(const char *fmt, ...)
va_end(args); va_end(args);
} }


inline uint32_t hax_cpu_id(void) uint32_t hax_cpu_id(void)
{ {
return (uint32_t)smp_processor_id(); return (uint32_t)smp_processor_id();
} }
Expand Down
2 changes: 1 addition & 1 deletion platforms/netbsd/hax_wrapper.c
Expand Up @@ -73,7 +73,7 @@ void hax_panic(const char *fmt, ...)
va_end(args); va_end(args);
} }


inline uint32_t hax_cpu_id(void) uint32_t hax_cpu_id(void)
{ {
return (uint32_t)cpu_number(); return (uint32_t)cpu_number();
} }
Expand Down
2 changes: 1 addition & 1 deletion platforms/windows/hax_wrapper.c
Expand Up @@ -31,7 +31,7 @@
#include "hax_win.h" #include "hax_win.h"
#include "../../core/include/ia32.h" #include "../../core/include/ia32.h"


inline uint32_t hax_cpu_id(void) uint32_t hax_cpu_id(void)
{ {
PROCESSOR_NUMBER ProcNumber = {0}; PROCESSOR_NUMBER ProcNumber = {0};
return (uint32_t)KeGetCurrentProcessorNumberEx(&ProcNumber); return (uint32_t)KeGetCurrentProcessorNumberEx(&ProcNumber);
Expand Down

0 comments on commit ea1a80e

Please sign in to comment.