Skip navigation.
Home
The QNX Community Portal

View topic - why kernel is not handling the interrupt from the client ??

why kernel is not handling the interrupt from the client ??

anything that doesn't fit to other groups.

why kernel is not handling the interrupt from the client ??

Postby hemanth » Fri May 09, 2014 6:13 am

const struct sigevent *intHandler(void *arg, int id)
{
start_clock = ClockCycles();

return(&event);
}

int ConfigureISR()
{

// Get IO privilege
//
ThreadCtl( _NTO_TCTL_IO, 0 );


//
// Setup COID and event

chid = ChannelCreate( 0 );
SIGEV_INTR_INIT( &event);
interruptID = InterruptAttach(10, intHandler, NULL, 0, 0);
if (interruptID == -1)

{
fprintf(stderr, "can't attach to IRQ\n");
perror (NULL);
exit (EXIT_FAILURE);
}
InterruptWait(0, NULL);
end_clock = ClockCycles();

InterruptLatency = (double) (end_clock - start_clock)/(double)(SYSPAGE_ENTRY(qtime)->cycles_per_sec);


fprintf(stderr,"%lld milli seconds\n", InterruptLatency = (InterruptLatency *1e-3));
measurements [17] = InterruptLatency;


return (EXIT_SUCCESS);
}

int main()
{
ConfigureISR(),
}

The above is the server code for receiving the data from client. I created a handler for server to handle the newly arrived data from client. the above code is running fine but why the kernel is not calling the
above handler when the new data is arrived from the client. I want to calculate the time at which the interrupt handler is called by the kernel. Could someone please help me.
It would be great help for me.

PLEASE ADMIN :POST MY QUESTION VERY SOON: I WANT TO SUBMIT THIS PROJECT BY EVENING TO MU UNIVERSITY.
hemanth
Active Member
 
Posts: 20
Joined: Mon Dec 23, 2013 11:14 pm

Return to General Programming

Who is online

Users browsing this forum: No registered users and 3 guests

cron