Re: Traversing task list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you very much, I think it uses RCU to protect the list traversal.

On Nov 17, 2010, at 2:24 PM, Mulyadi Santosa wrote:

> Hi..
> 
> On Wed, Nov 17, 2010 at 17:27, Juan Rafael Garcia Blanco
> <jgblanco.mail@xxxxxxxxx> wrote:
>> Hi,
>> few days ago, I asked you for a method to traverse the task list "atomically", and some of you pointed me out to read_lock(&tasklist_lock), which I found it the right solution. But I forgot to mention I am outside the kernel, I am writing a kernel module I mean. And those symbols aren't exported.
>> After some searches, I found rcu_read_lock() could do the job, and now I want to confirm this, please.
> 
> Uhm, I could be wrong, but have you checked for_each_process() macro
> defined in include/linux/sched.h?
> 
> 
> -- 
> regards,
> 
> Mulyadi Santosa
> Freelance Linux trainer and consultant
> 
> blog: the-hydra.blogspot.com
> training: mulyaditraining.blogspot.com


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux