On Thu, Jul 01, 2004 at 11:29:14 -0700, Greg Nate wrote: > Regarding acquiring a lock: I realize this may be a stupid question, > but how does one go about doing this? Can you provide a short code > example? Actualy a proper question here is: And WHICH lock? > Thanks > > -----Original Message----- > From: kernelnewbies-bounce@nl.linux.org > [mailto:kernelnewbies-bounce@nl.linux.org]On Behalf Of Dhiman, Gaurav > Sent: Thursday, July 01, 2004 9:27 AM > To: Anupam Kapoor; manish regmi > Cc: so_usp@yahoo.com.br; kernelnewbies@nl.linux.org > Subject: RE: List of Processes > > > > We need to acquire lock before accessing any common data structure of > kernel. As the "task_struct" list is the common data structure of kernel > which is accessed from different places in kernel. > We need to acquire the lock for this task list before accessing it, so > that when we are accessing the list no other process context or kernel > thread should be able to access it. > > Regards, > Gaurav ------------------------------------------------------------------------------- Jan 'Bulb' Hudec <bulb@ucw.cz>
Attachment:
signature.asc
Description: Digital signature