mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* simple synchronization questions (freeing on rmmod)
@ 2005-09-15 17:04 David Madore
  0 siblings, 0 replies; only message in thread
From: David Madore @ 2005-09-15 17:04 UTC (permalink / raw)
  To: Linux Kernel Mailing-List

Hi.

I'm trying to learn the rudiments of kernel programming by writing a
simple module (as it turns out, a driver for my motherboard's ECC RAM
controller).  The module installs basically three things: an interrupt
handler, a timer (to make sure the controller is checked periodically,
even if it does not generate an interrupt) and a file entry in the
/proc filesystem.

My question is about synchronization when the module is being removed.
To remove the timer, I am told that I must use del_timer_sync()
(rather than just del_timer()) so as to make sure there is no instance
of the timer still running.  Now what about the interrupt handler?  Is
there a guarantee that after free_irq() there cannot be an instance of
the interrupt handler running on another process?  If not, what is the
recommended way to make sure of that before exiting the module?
Lastly, what about the /proc entry?  What is the recommended and
reliable way to make sure all open file descriptors pointing to it are
closed before exiting the module?

Thanks for your help,

-- 
     David A. Madore
    (david.madore@ens.fr,
     http://www.madore.org/~david/ )

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-09-15 17:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-15 17:04 simple synchronization questions (freeing on rmmod) David Madore

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®