Re: Please suggest a way to synchronize tasklets.

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

 



Hi..

On Sat, Nov 8, 2008 at 5:47 AM, StephanT <stman937-linewbie@xxxxxxxxx> wrote:
> Hello there,
>
> Environment is embedded Linux 2.4.18.
>
> Context is driver mapped on one interrupt coming from 40 possible
> sources - everything being multiplexed by a FPGA.
>
> When the interrupt triggers the driver reads three FPGA registers to
> discover the interrupt source. For each source it spawns a tasklet which
> deals with the data transfer. The driver_interrupt_routine disables the
> interrupt by masking it. The last living tasklet should re-enable (un_mask)
> the
> interrupt.
>
> Problem: In the tasklet context how to find out if this tasklet is the last
> living one?

how about this: each tasklet atomically test and increase an atomic
counter. once it reach certain number that marks the total tasklet
spawned, then you know it's the time to unmask the interrupt.

make sense?

regards,

Mulyadi.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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