* Task Queues
@ 2000-06-08 4:23 Greg Johnson
2000-06-08 15:01 ` Daris Nevil
0 siblings, 1 reply; 2+ messages in thread
From: Greg Johnson @ 2000-06-08 4:23 UTC (permalink / raw)
To: Linux PPC Mailing List
Hi All,
I am trying to create an ISR for our hardware that implements a
"bottom half" interrupt handler. I use a task queue to do this
since our driver is a loadable module. Everything works fine
except that if the task is added to the tq_immediate task queue
it does not seem to run. If I use the tq_scheduler task queue
it works fine. I gather that for bottom halfves that it is
appropriate to schedule them on the immediate queue.
I have also tried running other tasks that are scheduled elsewhere
in the driver, and have the same problem.
Thanks
Greg.
--
+------------------------------------------------------+
| Do you want to know more? www.geocities.com/worfsom/ |
| ..ooOO Greg Johnson OOoo.. |
| HW/SW Engineer gjohnson@research.canon.com.au |
| Canon Information Systems Research Australia (CISRA) |
| 1 Thomas Holt Dr., North Ryde, NSW, 2113, Australia |
| "I FLEXed my BISON and it went YACC!" - me. |
+------------------------------------------------------+
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Task Queues
2000-06-08 4:23 Task Queues Greg Johnson
@ 2000-06-08 15:01 ` Daris Nevil
0 siblings, 0 replies; 2+ messages in thread
From: Daris Nevil @ 2000-06-08 15:01 UTC (permalink / raw)
To: Greg Johnson; +Cc: Linux PPC Mailing List
Greg,
Not sure what is going wrong for you, but I can show you what
works for me.
Somewhere in your device driver data structure (or as a static
variable) create a task queue:
struct tq_struct bh_tq;
In your driver initialization function, initialize the task queue:
static void bottom_half_handler(void* dev);
bh_tq.routine = bottom_half_hander;
bh_tq.data = (void*)dev; // Or pass whatever data structure you will need
Then, when you are ready to place your function in the queue:
queue_task(&bh_tq, &tq_immediate);
mark_bh(IMMEDIATE_BH); // This might be the step you are missing
The mark_bh() function sets a flag that tells the scheduler it needs to
run the list of functions in the tq_immediate queue.
Hope this helps.
Regards,
Daris Nevil
SiSIC Inc/SNMC
www.snmc.com
Greg Johnson wrote:
> Hi All,
>
> I am trying to create an ISR for our hardware that implements a
> "bottom half" interrupt handler. I use a task queue to do this
> since our driver is a loadable module. Everything works fine
> except that if the task is added to the tq_immediate task queue
> it does not seem to run. If I use the tq_scheduler task queue
> it works fine. I gather that for bottom halfves that it is
> appropriate to schedule them on the immediate queue.
>
> I have also tried running other tasks that are scheduled elsewhere
> in the driver, and have the same problem.
>
> Thanks
>
> Greg.
>
> --
> +------------------------------------------------------+
> | Do you want to know more? www.geocities.com/worfsom/ |
> | ..ooOO Greg Johnson OOoo.. |
> | HW/SW Engineer gjohnson@research.canon.com.au |
> | Canon Information Systems Research Australia (CISRA) |
> | 1 Thomas Holt Dr., North Ryde, NSW, 2113, Australia |
> | "I FLEXed my BISON and it went YACC!" - me. |
> +------------------------------------------------------+
>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-06-08 15:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-06-08 4:23 Task Queues Greg Johnson
2000-06-08 15:01 ` Daris Nevil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).