Skip to content

Commit

Permalink
Merge branch 'master' into boost/lockfree/realtime/buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
saikishor authored Jan 13, 2025
2 parents bd74a53 + 5b85370 commit 0d3fc7e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions include/realtime_tools/realtime_helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@
#include <vector>

#ifdef _WIN32
#include <windows.h>
using NATIVE_THREAD_HANDLE = HANDLE;
// Here we directly use void* instead of including windows.h
// and using HANDLE macro to avoid polluting all the downstream
// compilation units that include the public header realtime_helpers.hpp
// with problematic macros like MIN, MAX or ERROR
using NATIVE_THREAD_HANDLE = void *;
#else
using NATIVE_THREAD_HANDLE = pthread_t;
#endif
Expand Down
4 changes: 3 additions & 1 deletion src/realtime_helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@

#include "realtime_tools/realtime_helpers.hpp"

#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
#ifdef _WIN32
#include <windows.h>
#else
#include <sched.h>
#include <sys/capability.h>
#include <sys/mman.h>
Expand Down

0 comments on commit 0d3fc7e

Please sign in to comment.