Timer task censored problem

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

Misha
Location: Florence.
Posts: 73
Joined: Mon Nov 22, 2004 4:15 pm

Timer task censored problem

Tue Aug 30, 2005 5:12 pm

I am using kernel 2.4.27 on AT91RM9200-EK.

I am testing the censored_task(&Task, &tq_timer) usage.

The function returns 1, then is OK.
kernel jiffies are regularly updated.

cat /proc/interrupts reports:

1: 1104041 timer, at91_rtc, at91_serial
4: 0 eth0
13: 0 spi
23: 0
24: 5195 eth0
Err: 0

However the function specified into the Task structure is never executed.

How can I see if the 100 Hz timer scheduler is regularly working ?
Is it to be enabled in kernel configuration ? Where ?

Any hint is welcome.
Thank you for your attention.
Misha
Location: Florence.
Posts: 73
Joined: Mon Nov 22, 2004 4:15 pm

Solution found..

Wed Aug 31, 2005 11:36 am

I was following the well-known sched.c example in chapter 11 of
"The Linux Kernel Module Programming Guide (2.4.x)"
In the example the tq_struct was statically initialized.

static void intrpt_routine(void *);

static struct tq_struct Task =
{
NULL,0,intrpt_routine,0
};

static void intrpt_routine(void *)
{
.. code
}

Well, the following
censored_task(&Task,&tq_timer);
will be useless because Task.routine field is still zero ....
I cannot figure why it is not initialized

All works perfectly only if I initialize it runtime:
Task.routine = intrpt_routine; then issue
censored_task(&Task,&tq_timer);

I hope this can spare someone a bit of headache.
If someone can explain the static initialization problem is wellcome.

Return to “LINUX”

Who is online

Users browsing this forum: No registered users and 3 guests