diff options
| author | Tauwni <102470988+Tauwni@users.noreply.github.com> | 2026-11-26 12:19:12 +0100 |
|---|---|---|
| committer | Tauwni <102470988+Tauwni@users.noreply.github.com> | 2026-11-26 12:19:12 +0100 |
| commit | beffaa9a476ca1b3dfd9cfa55e39eafbb1f5eec6 (patch) | |
| tree | 32877805bf4eb46d9a89d5753db6b5a2b06dc845 /runtime/src/queue_holds.h | |
| parent | f29ca7bacae9507f83e8c56abdb604bd4efb4cf1 (diff) | |
| parent | a73a57e1339be072baf5522351c8ec7f1482b56b (diff) | |
Merge main into fix/null-descriptor-generated-dir
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_); |