Skip to content

Commit

Permalink
MInor code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dougbinks committed Jun 11, 2023
1 parent 9814a96 commit 387665f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/TaskScheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ namespace

#if ( defined _WIN32 && ( defined _M_IX86 || defined _M_X64 ) ) || ( defined __i386__ || defined __x86_64__ )
// Note: see https://software.intel.com/en-us/articles/a-common-construct-to-avoid-the-contention-of-threads-architecture-agnostic-spin-wait-loops
static void SpinWait( uint32_t spinCount_ )
void SpinWait( uint32_t spinCount_ )
{
uint64_t end = __rdtsc() + spinCount_;
while( __rdtsc() < end )
Expand All @@ -170,13 +170,13 @@ namespace
}
}
#endif
}

static void SafeCallback( ProfilerCallbackFunc func_, uint32_t threadnum_ )
{
if( func_ != nullptr )
void SafeCallback( ProfilerCallbackFunc func_, uint32_t threadnum_ )
{
func_( threadnum_ );
if( func_ != nullptr )
{
func_( threadnum_ );
}
}
}

Expand Down
1 change: 0 additions & 1 deletion src/TaskScheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

#include <atomic>
#include <thread>
#include <condition_variable>
#include <stdint.h>
#include <functional>

Expand Down

0 comments on commit 387665f

Please sign in to comment.