shared_counter_across_IH&devicedriver

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

 



hi all,
i have a shared counter which  is filled by 
device driver and emptied by interrupt handler 
my IH cheacke whether 
counter>0
if yes it does some work,
now when i run the program 
my device driver fills upto  N  values increment the
counter,simultaneously IH grabe it,
there is one user level program which writes to device
driver's buffer and IH grabs from that buffer,

but as IH is very fast it grabs all values as soon as
they filles but once counter reaches 0 ,
in  IH counter > 0 condition becomes false,
and does nothing,now soon then device driver again
fills the N value but this time IH is not checking
that condition ,
i had declared the counter as atomic_t
plz let me know the reason
thanks to all
Prasanna 


	
		
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 

--
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