Dear Friends,
I am having a problem in using semaphore. Please advice me about solving
this problem.
Environment:
~~~~~~~~~~~~
RT-Linux Ver 3.0 with Kernel 2.2 (From the FSM Labs CD, Direct Install)
My Setup:
~~~~~~~~~
My Driver is having an ISR which will be called whenever a interrupt comes
from my hardware. In the ISR, I am calling sem_post(Mysem).
I have written an another module which is having a thread and it will wait
for the above mentioned semaphore and access the hardware to read the data.
I am able to receive the interrupts and my ISR are is getting called
properly. And also my thread is waking properly and reading the data.
Problem:
~~~~~~~~
The no of interrupts and the no of reads are not matching. (Meaning), Let us
say (for an example) the ISR is invoked 100 times, but my thread is waking
for 60-70 times only. This means the semaphore is posted(over written) even
before the previous semaphore is utilized.
How can I solve this problem...
Please answer me ....
Vijay Ananth K
BEGIN:VCARD
VERSION:2.1
N:;Vijay;Ananth;Mr
FN:Vijay Ananth
NICKNAME:VAK
ORG:Indus Teqsite Pvt. Ltd.;Software Development Group
TITLE:Manager
TEL;WORK;VOICE:91-44-4800908
TEL;WORK;FAX:91-44-4848703
ADR;WORK;ENCODING=QUOTED-PRINTABLE:;;#7, Arya Gowder Road,=0D=0AWest Mambalam;Chennai;Tamil Nadu;600033;India
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:#7, Arya Gowder Road,=0D=0AWest Mambalam=0D=0AChennai, Tamil Nadu 600033=0D=
=0AIndia
URL;WORK:http://www.industeqsite.com
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20010531T062151Z
END:VCARD