diff options
author | Martin Braun <martin.braun@ettus.com> | 2020-12-07 17:46:05 +0100 |
---|---|---|
committer | michael-west <michael.west@ettus.com> | 2020-12-21 15:28:24 -0800 |
commit | 3b9ced8f07c068faf1f494ce170cb44edaa47075 (patch) | |
tree | 25feb579dbf78023a74e97f156358cc2df473487 /fpga | |
parent | daa7ea5913bcbe2c63715eaab18b8c8f26608608 (diff) | |
download | uhd-3b9ced8f07c068faf1f494ce170cb44edaa47075.tar.gz uhd-3b9ced8f07c068faf1f494ce170cb44edaa47075.tar.bz2 uhd-3b9ced8f07c068faf1f494ce170cb44edaa47075.zip |
mpm: rpc server: Fix unclaim sequence
Sequence is now:
1. Get _state lock
2. Kill reclaim timeout
3. Run deinit sequence
4. Clear claim token and session ID
5. Release _state lock
Before, we were not locking the mutex, and the timer was killed after
the deinit sequence. If the deinit sequence stalls for whatever reason,
that doesn't have to cause a claimer loss to be reported. UHD will
already have stopped the reclaim loop before unclaim() is called.
In the stall case, it would also have been possible the to acquire a new
claim while the deinit() is still running. This is prevented with the
combination of actually acquiring the mutex (like claim() and reclaim()
do) and moving the token/session ID clearing to the end.
Diffstat (limited to 'fpga')
0 files changed, 0 insertions, 0 deletions