Quantcast
Channel: Active questions tagged linux-kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 12244

How can I check that spin_lock is working correctly?

$
0
0

I've implemented a basic Linux kernel module with /proc.

It can add elements to the linked list with echo add number > /proc/list and remove elements from the list with echo remove number > /proc/list. I've added spin_lock and spin_unlock around all critical sections (adding and removing elements elements from the list).

How can I check that the spinlocks are working correctly? I've tried making 2 scripts, one for adding elements and the other one for removing, and then executing them simultaneously with ./script1.sh & ./script2.sh. But the result is the same with and without spinlocks.


Viewing all articles
Browse latest Browse all 12244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>