mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-30 01:04:36 +00:00
29 lines
541 B
C++
29 lines
541 B
C++
|
#ifndef __TRACYLOCKHELPERS_HPP__
|
||
|
#define __TRACYLOCKHELPERS_HPP__
|
||
|
|
||
|
#include <stdint.h>
|
||
|
|
||
|
#include "../public/common/TracyForceInline.hpp"
|
||
|
|
||
|
namespace tracy
|
||
|
{
|
||
|
|
||
|
static tracy_force_inline uint64_t GetThreadBit( uint8_t thread )
|
||
|
{
|
||
|
return uint64_t( 1 ) << thread;
|
||
|
}
|
||
|
|
||
|
static tracy_force_inline bool IsThreadWaiting( uint64_t bitlist, uint64_t threadBit )
|
||
|
{
|
||
|
return ( bitlist & threadBit ) != 0;
|
||
|
}
|
||
|
|
||
|
static tracy_force_inline bool AreOtherWaiting( uint64_t bitlist, uint64_t threadBit )
|
||
|
{
|
||
|
return ( bitlist & ~threadBit ) != 0;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
#endif
|