I am trying to parse the spinlock variable inside the kernel kernel of the Linux kernel. In the case of a mutex, if the mutex was locked, the variable count should be set to 0. In the case of spin-lock spinlock_t my_lock has fields such as
(struct raw_spinlock) rlock
(arch_spinlock_t) raw_lock
(unsigned int) lock
(unsigned int) break_lock
Integer variables have a value of 0. Would they have a different value if a lock were made? Is there another way to check in a dump for a variable spin lock to make sure it was taken? Is architecture dependent significance?
source
share