mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-22 06:15:58 +00:00
fix(quest): check a tracked KGSL context before answering a read
A descriptor can close without destroying its contexts and its number can be reused. KGSL checks the owner on every wait, so one wait on the retired timestamp keeps a read of a dead context an error.
This commit is contained in:
1 parent
bf0ee99b6d
commit
6d7732710c
2 files changed
+21
-11
No files matched your search
@@ -95,14 +95,18 @@ int main(void) {
|
||||
assert(read_timestamp(3, ×tamp) == 0 && timestamp == 2 && waits == 3);
|
||||
|
||||
waits = 0;
|
||||
assert(read_timestamp(3, ×tamp) == 0 && timestamp == 2 && waits == 1);
|
||||
assert(read_timestamp(3, ×tamp) == 0 && timestamp == 2 && waits == 2);
|
||||
|
||||
retired = 3;
|
||||
waits = 0;
|
||||
assert(read_timestamp(3, ×tamp) == 0 && timestamp == 3 && waits == 1);
|
||||
assert(read_timestamp(3, ×tamp) == 0 && timestamp == 3 && waits == 2);
|
||||
|
||||
waits = 0;
|
||||
assert(read_timestamp(3, ×tamp) == 0 && timestamp == 3 && waits == 0);
|
||||
assert(read_timestamp(3, ×tamp) == 0 && timestamp == 3 && waits == 1);
|
||||
|
||||
wait_error = EINVAL;
|
||||
assert(read_timestamp(3, ×tamp) == -1 && errno == EINVAL);
|
||||
wait_error = 0;
|
||||
|
||||
submit(4);
|
||||
retired = 4;
|
||||
|
||||
Reference in new issue
Block a user