Skip to content

Commit

Permalink
applying clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
GilmarCorreia committed Aug 21, 2024
1 parent 47d2901 commit 5e0cdfc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/thread_priority.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
#include "realtime_tools/thread_priority.hpp"

#ifdef _WIN32
#include <windows.h>
#include <windows.h>
#else
#include <sched.h>
#include <sched.h>
#endif

#include <cstring>
Expand All @@ -51,15 +51,15 @@ bool has_realtime_kernel()

bool configure_sched_fifo(int priority)
{
#ifdef _WIN32
#ifdef _WIN32
HANDLE thread = GetCurrentThread();
return SetThreadPriority(thread, priority);
#else
#else
struct sched_param schedp;
memset(&schedp, 0, sizeof(schedp));
schedp.sched_priority = priority;
return !sched_setscheduler(0, SCHED_FIFO, &schedp);
#endif
#endif
}

} // namespace realtime_tools

0 comments on commit 5e0cdfc

Please sign in to comment.