hello,
I have the following code for the isr of the parallel port:
unsigned int rt_mcm_spp_isr( unsigned int irq_number, struct pt_regs *p
)
{
RT_MCM_DPRINTF0( "Starting rt_mcm_spp_isr\n" );
++daq_counter;
RT_MCM_DPRINTF1( "daq_counter = %d\n", daq_counter );
if (( ( daq_counter % (shm->down_sampling) ) == 0 ) &&
( measure_lock == 0 ) )
{
measure_lock = -1;
rt_task_wakeup( &measure );
}
rtl_hard_enable_irq( RT_MCM_SPP_IRQ );
RT_MCM_DPRINTF0( "Leaving rt_mcm_spp_isr\n" );
return 0;
}
static void rt_mcm_measure(int t)
{
RT_MCM_DPRINTF0( "Starting rt_mcm_measure\n" );
/*
* stuff deleted
*/
RT_MCM_DPRINTF0( "Leaving rt_mcm_measure\n" );
measure_lock = 0;
rt_task_wait();
}
but somehow I do not understand the kernel messages
for sample time = 10sec, shm->down_sampling = 2 :
Starting rt_mcm_spp_isr
daq_counter = 0
Starting rt_mcm_measure
Leaving rt_mcm_measure
Leaving rt_mcm_spp_isr
Starting rt_mcm_spp_isr
daq_counter = 1
Leaving rt_mcm_spp_isr
Starting rt_mcm_spp_isr
daq_counter = 2
Leaving rt_mcm_spp_isr
1. In the above example it seems that rt_task_wakeup( &measure )
is just a function call. I thought that rt_task_wakeup( &measure )
will just set the task to READY, then start the scheduler who
will set some registers such that after the isr the processor
starts at the task's address. Is this wrong?
2. If measure_lock = 0 at the end of the measure task,
then the next time ((daq_couter % 2) == 0), it should be
restarted. I am wrong?
thanks for any hints,
peterw
Dr. Peter Wurmsdobler
CTM - Centre de Transfert des Microtechniques
39, av. de l'Observatoire, BP-1445, 25007 Besancon CEDEX 3
TELEPHONE: +33 3 81 47 70 20 TELECOPIE: +33 3 81 47 70 21
E-mail: [EMAIL PROTECTED]
Ceterum censeo MIRCOSOFTem esse delendam.
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/