mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-18 04:53:06 +01:00
Added thread test.
This commit is contained in:
@@ -74,7 +74,7 @@
|
||||
// #define BX_STATIC_ASSERT(_condition, ...) static_assert(_condition, "" __VA_ARGS__)
|
||||
#define BX_STATIC_ASSERT(_condition, ...) typedef char BX_CONCATENATE(BX_STATIC_ASSERT_, __LINE__)[1][(_condition)]
|
||||
|
||||
#define BX_CACHE_LINE_ALIGN_MARKER() BX_ALIGN_STRUCT(BX_CACHE_LINE_SIZE, struct) {}
|
||||
#define BX_CACHE_LINE_ALIGN_MARKER() BX_ALIGN_STRUCT(BX_CACHE_LINE_SIZE, struct) BX_CONCATENATE(bx_cache_line_marker_compiler_stfu, __COUNTER__) {}
|
||||
#define BX_CACHE_LINE_ALIGN(_def) BX_CACHE_LINE_ALIGN_MARKER(); _def; BX_CACHE_LINE_ALIGN_MARKER()
|
||||
|
||||
#define BX_ALIGN_STRUCT_16(_struct) BX_ALIGN_STRUCT(16, _struct)
|
||||
|
||||
@@ -117,11 +117,19 @@ namespace bx
|
||||
return result;
|
||||
}
|
||||
|
||||
/// Skip _offset bytes forward.
|
||||
inline int64_t skip(SeekerI* _seeker, int64_t _offset)
|
||||
{
|
||||
return _seeker->seek(_offset, Whence::Current);
|
||||
}
|
||||
|
||||
/// Seek to any position in file.
|
||||
inline int64_t seek(SeekerI* _seeker, int64_t _offset = 0, Whence::Enum _whence = Whence::Current)
|
||||
{
|
||||
return _seeker->seek(_offset, _whence);
|
||||
}
|
||||
|
||||
/// Returns size of file.
|
||||
inline int64_t getSize(SeekerI* _seeker)
|
||||
{
|
||||
int64_t offset = _seeker->seek();
|
||||
|
||||
@@ -117,6 +117,11 @@ namespace bx
|
||||
return m_running;
|
||||
}
|
||||
|
||||
int32_t getExitCode() const
|
||||
{
|
||||
return m_exitCode;
|
||||
}
|
||||
|
||||
private:
|
||||
int32_t entry()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user