File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ LIBRARY_PATHS+=%BUILD_ABS%/makefiles/bfm/bin/native/
6565
6666WINDOWS_ SOURCES+ =
6767WINDOWS_ INCLUDE_ PATHS+ =
68- WINDOWS_ LIBS+ =
68+ WINDOWS_ LIBS+ =setu p a p i
6969WINDOWS_ LIBRARY_ PATHS+ =
7070
7171LINUX_ SOURCES+ =
Original file line number Diff line number Diff line change 2222#include < ioctl.h>
2323#include < guard_exceptions.h>
2424
25+ #if defined(_WIN32) || defined (__CYGWIN__)
26+ #include < windows.h>
27+ #else
2528#include < sched.h>
2629#include < iostream>
30+ #endif
2731
2832void
2933hello_world ()
@@ -41,13 +45,15 @@ main(int argc, const char *argv[])
4145
4246 vmcall_registers_t regs;
4347
44- // We need to make sure that we are running on the correct core. When we
45- // perform the vmcall, its likely that this application will end up running
46- // on core #0 anyways, but this make sure there are no issues regardless.
48+ # if defined(_WIN32) || defined (__CYGWIN__)
49+ SetProcessAffinityMask ( GetCurrentProcess (), 1 );
50+ # else
4751 cpu_set_t mask;
4852 CPU_ZERO (&mask);
4953 CPU_SET (0 , &mask);
5054 sched_setaffinity (0 , sizeof (mask), &mask);
55+ #endif
56+
5157
5258 guard_exceptions ([&]
5359 {
You can’t perform that action at this time.
0 commit comments