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

Commit

Permalink
Merge pull request #257 from coxuintel/more_cpus_rebuild
Browse files Browse the repository at this point in the history
Fix broken build by PR#255.
  • Loading branch information
wcwang authored Dec 26, 2019
2 parents d62d8f9 + ea1a80e commit 14792f2
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
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ void hax_unmap_page(struct hax_page *page);
void hax_log(int level, const char *fmt, ...);
void hax_panic(const char *fmt, ...);

uint32_t hax_cpu_id(void);

#ifdef __cplusplus
}
#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);
}

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

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

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

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

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

0 comments on commit 14792f2

Please sign in to comment.