mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-01 23:20:55 +00:00
parent
9013ca5364
commit
c99729093a
@ -146,12 +146,16 @@ void Cancelable_lock::unlock()
|
|||||||
|
|
||||||
/* transfer lock ownership to next applicant and wake him up */
|
/* transfer lock ownership to next applicant and wake him up */
|
||||||
_owner = *next_owner;
|
_owner = *next_owner;
|
||||||
|
|
||||||
|
/* make copy since _owner may change outside spinlock ! */
|
||||||
|
Applicant owner = *next_owner;
|
||||||
|
|
||||||
if (_last_applicant == next_owner)
|
if (_last_applicant == next_owner)
|
||||||
_last_applicant = &_owner;
|
_last_applicant = &_owner;
|
||||||
|
|
||||||
spinlock_unlock(&_spinlock_state);
|
spinlock_unlock(&_spinlock_state);
|
||||||
|
|
||||||
_owner.wake_up();
|
owner.wake_up();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user