From mboxrd@z Thu Jan 1 00:00:00 1970 From: contemplatingzombie@gmail.com (contemplating zombie) Date: Sat, 17 Dec 2011 19:15:30 -0500 Subject: Question about RCU Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hi, I understand that multiple readers have to use rcu_read_lock(void) and rcu_read_unlock(void) to read data protected by rcu. However, I do not understand how the kernel distinguishes between multiple rcu protected regions. For e.g. if a region/data is protected by a mutex or spinlock, then the code is something like: int data; mutex_t/spinlock_t lock; print_data() { acquire(lock); release(lock); } Here kernel can distinguish between different regions/data using different locks used to protect it. However, the rcu_read(un)lock() do not accept any lock as a parameter. How does it manage under the hood? -Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20111217/7520f337/attachment.html