CMP EMBEDDED.COM

Login | Register     Welcome Guest   IPS  
HOME DESIGN PRODUCTS COLUMNS E-LEARNING CONFERENCES CODE FORUMS/BLOGS NEWSLETTERS CONTACT FEATURES RSS RSS

Listing 7 Application process for interrupt

interrupt type serviced by the driver
ISR. The process or thread then han-dles
the interrupt, while the dispatch
process waits for the next interrupt. In
practical operation, this process opens
the appropriate module device file,
then makes (typically) an ioctl()or
read()call that ýblocks,ý suspending
the caller and allowing other process-es
and threads to run while the ýdis-patchý
process waits for the interrupt.
void waitForInt()
{
unsigned int allData;
printf(ýwaitForInt():called,doing ioctl()\n ý);
ioctl(fd_ioctl,WAIT_FOR_INTERRUPT );
read(fd_read,&allData,1 );
printf(ýwaitForInt():Intererupt count =%d \n ý,(allData &0x0000FFFF));
printf(ýwaitForInt():Application count=%d \n ý,
((allData &0xFFFF0000)>>16));
}

Embedded.com Career Center
Ready for a change?
SEARCH JOBS

Browse all jobs

SPONSOR
RECENT JOB POSTINGS





 :