Re: [RFC][PATCH 1/2] locking: Introduce __cleanup__ based guards

From: Mathieu Desnoyers
Date: Fri May 26 2023 - 14:59:04 EST

On 5/26/23 14:49, Waiman Long wrote:

BTW, do we have a use case for double_lock_guard/double_lock_scope? I can envision a nested lock_scope inside a lock_scope, but taking 2 auto locks of the same type at init time and then unlock them at exit just doesn't make sense to me.

AFAIU taking both runqueue locks for source and destination runqueues on migration is one use-case for double_lock_guard/scope.



Mathieu Desnoyers
EfficiOS Inc.