Re: functions in a single module

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

 






only one user level process accesses this module at anytime. There is only
one user level process that uses this module.




Amit Kumar Singh/HSS@HSS@nl.linux.org on 06/08/2004 11:07:46 PM

Sent by:    kernelnewbies-bounce@nl.linux.org


To:    kernelnewbies@nl.linux.org
cc:

Subject:    functions in a single module






HI,

   I have 6 functions in a single module, some of those are netfilter hook
functions, others read/write etc functions for a char device, both type of
functions work closely.Plus, I have a couple of timer expiry functions
within my module.  My doubt is : can functions within a single module
pre-empt each other, i use kenel 2.4.20-8, on a uniprocessor system.

My read/write char device functions are used by a user level process, the
char device is used as a control interface between the module and the user
space process. So the user space process sets certain variables using
write() on the char device fd. The netfilter hook functions that reside in
the same module, use these variables(ones set in the char device driver's
write() function ). So as the write function(write()) writes to these
shared variable, can a packet come in and the netfilter hook function be
called, i.e basically the hook function pre-empts the write() function?
Also, what happens when a timer expires, its expiry callback function is
called immediately while write() is in progress, or what exactly happens.

And if they can/do pre-empt each other then what would be the best strategy
to protect these shared variables.

thanks
Amit

"DISCLAIMER: This message is proprietary to Hughes Software Systems Limited
(HSS) and is intended solely for the use of the individual to whom it is
addressed. It may contain  privileged or confidential information and
should not be circulated or used for any purpose other than for what it is
intended. If you have received this message in error, please notify the
originator immediately. If you are not the intended recipient, you are
notified that you are strictly prohibited from using, copying, altering, or
disclosing the contents of this message. HSS accepts no responsibility for
loss or damage arising from the use of the information transmitted by this
email including damage from virus."


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/




--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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