Re: export IO function symbol

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

 



On Mon, Oct 10, 2005 at 12:49:01 +0900, NAHieu wrote:
> I am writing a kernel module, and there is an I/O function (which
> might sleep in the queue to wait for IO event).
> 
> I want to export this function (EXPORT_SYMBOL), so other modules or
> kernel code can use it. The problem is: I am afraid that if this
> function is called at the same time (one is running in module, and at
> the same time other module calls it), there can be conflict. Is that
> really possible?

If there is a race, it is there even if you don't export the function.
Flow of control is independent on modules.

> If the problem is possible, how can I solve it? Is mutex the answer to
> this problem?

There is nothing that's actually called "mutex". I suppose you mean
semaphore. Yes, you can use it.

On the other hand you should not be afraid -- you should *know*.

--
						 Jan 'Bulb' Hudec <bulb@xxxxxx>

Attachment: signature.asc
Description: Digital signature


[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