diff options
Diffstat (limited to 'runtime/src/queue_holds.h')
| -rw-r--r-- | runtime/src/queue_holds.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/src/queue_holds.h b/runtime/src/queue_holds.h index 2839d4210..40cc33117 100644 --- a/runtime/src/queue_holds.h +++ b/runtime/src/queue_holds.h | |||
| @@ -93,6 +93,13 @@ public: | |||
| 93 | return it == fences_.end() || it->second < value; | 93 | return it == fences_.end() || it->second < value; |
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | // The highest Signal submitted for the fence (or set by the CPU); 0 for an unknown semaphore. | ||
| 97 | std::uint64_t submitted_value(Semaphore semaphore) const { | ||
| 98 | std::lock_guard lock(mutex_); | ||
| 99 | const auto it = fences_.find(semaphore); | ||
| 100 | return it == fences_.end() ? 0 : it->second; | ||
| 101 | } | ||
| 102 | |||
| 96 | // true when no submitted Signal reaches `value` yet. Unknown semaphores are satisfied. | 103 | // true when no submitted Signal reaches `value` yet. Unknown semaphores are satisfied. |
| 97 | bool pending(Semaphore semaphore, std::uint64_t value) const { | 104 | bool pending(Semaphore semaphore, std::uint64_t value) const { |
| 98 | std::lock_guard lock(mutex_); | 105 | std::lock_guard lock(mutex_); |