locking/locktorture: Pass thread id to lock/unlock functions
authorWaiman Long <longman@redhat.com>
Thu, 18 Mar 2021 17:28:13 +0000 (13:28 -0400)
committerIngo Molnar <mingo@kernel.org>
Fri, 19 Mar 2021 11:13:10 +0000 (12:13 +0100)
commitaa3a5f31877e5dc131cc286ce707413d441c8375
tree080a428513ea19f63fd915a5edd45c6766609d8e
parent5261ced47f8e89173c3b015f6152a05f11a418c3
locking/locktorture: Pass thread id to lock/unlock functions

To allow the lock and unlock functions in locktorture to access
per-thread information, we need to pass some hint on how to locate
those information. One way to do this is to pass in a unique thread
id which can then be used to access a global array for thread specific
information.

Change the lock and unlock method to add a thread id parameter which
can be determined by the offset of the lwsp/lrsp pointer from the global
lwsa/lrsa array.

There is no other functional change in this patch.

Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20210318172814.4400-5-longman@redhat.com
kernel/locking/locktorture.c