tq_immediate

Daniel Drotos (drdani@mazsola.iit.uni-miskolc.hu)
Mon, 22 Feb 1999 09:06:56 +0100 (MET)


Hi,

I'm working on a network device driver which has a global data (very
complex dynamic data structure actually) which is accessed for read
and write from dev->hard_start_xmit and dev->do_ioctl and a third
function, let's say foo(), which is not called directly but frequently
queued as task on tq_immediate. Should the global data be protected by
sema/spinlock or something?

The ioctl can not interrupt other functions, that's clear. I hope that
hard_start_xmit can not either. But what about the queued task foo?
Queued tasks are called by the scheduler which can be called by timer
interrupt. Does this mean that a queued task acts like an interrupt
service because it can be called in the middle of dev->do_ioctl for
example?

BTW is that true that dev->hard_start_xmit call is always initiated
by a user program (send/write call). Or is there any case when it is
called by the kernel itself (for example from a queued task)?

Daniel

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/