On Fri, Feb 08, 2002 at 04:20:12PM -0600, Amit Kucheria wrote: > I am trying to understand the issues in writing a driver that is > re-entrant. What are the locking issues involved (if any)? I've never done network device drivers .. however, there are gobs of the things in the kernel source tree, so hopefully they can provide good examples. I think the first thing to do when programming re-entrant code is to avoid 'static' storage of variables in your functions. If there are any datastructures you would use from several different points, be sure to use proper locking techniques to synchronize access. (See Documentation/spinlocks.txt for locking details.) And, don't forget about the huge body of source code out there to study from. :) -- "I'm not sure which upsets me more: that people are so unwilling to accept responsibility for their own actions, or that they are so eager to regulate everyone else's." -- Kee Hinckley
Attachment:
pgp00028.pgp
Description: PGP signature