-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rtcheck: Added rtcheck on macOS and added this check to the allocatio…
…n test
- Loading branch information
Showing
3 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/*============================================================================== | ||
Copyright 2018 by Tracktion Corporation. | ||
For more information visit www.tracktion.com | ||
You may also use this code under the terms of the GPL v3 (see | ||
www.gnu.org/licenses). | ||
pluginval IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER | ||
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE | ||
DISCLAIMED. | ||
==============================================================================*/ | ||
|
||
#pragma once | ||
|
||
#if PLUGINVAL_ENABLE_RTCHECK | ||
#include <rtcheck.h> | ||
#define RTC_REALTIME_CONTEXT rtc::realtime_context rc##__LINE__; rtc::disable_checks_for_thread (static_cast<uint64_t>(rtc::check_flags::pthread_mutex_lock) | static_cast<uint64_t>(rtc::check_flags::pthread_mutex_unlock)); | ||
|
||
#define RTC_REALTIME_CONTEXT_IF_LEVEL_10(level) \ | ||
std::optional<rtc::realtime_context> rc; \ | ||
\ | ||
if (level >= 10) \ | ||
{ \ | ||
rc.emplace(); \ | ||
rtc::disable_checks_for_thread (static_cast<uint64_t>(rtc::check_flags::pthread_mutex_lock) \ | ||
| static_cast<uint64_t>(rtc::check_flags::pthread_mutex_unlock)); \ | ||
} | ||
|
||
#else | ||
#define RTC_REALTIME_CONTEXT | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters