On Mon, Aug 28, 2000 at 07:57:07PM -0500, Sheldon Hoffman wrote:
> Does anyone know what limitations there are on the stack size of an
> interrupt service routine (ISR) in RT Linux 2.2?
Small. Dynamic memory allocation is bad in RT, even on the stack.
So there are two ways to do what you want to do.
1. Statically allocate a bunch of big buffers and do
enter_irq_handler:
buff_t *b = my_isr_alloc();
if(!b) scream and cry
else{ ...}
2. create a RT thread with a big stack and make it do the work.
In general, if you need a lot of resources (space,time) in an ISR,
it's good to rewrite it to do what you want to do in a thread (or in Linux).
>
> The ISR is specified in the call to rtl_request_irq():
>
> rtl_request_irq(irqN, isrFunc);
>
> I'm using Red Hat Linux 6.1 with kernel 2.2.14-rtl2.2
> on a 233 Mhz pentium.
>
> For example, can I safely define my isrFunc as:
>
> unsigned int
> isrFunc(unsigned int irqN, struct pt_regs *regs)
> {
> ...
> f();
> ...
> }
>
> int f(void)
> {
> char anotherBigBuff[100000];
> ...
> }
>
> If there is some limit, how can the ISR find out what it is?
> Can it be changed without having to recompile Linux/RTLinux?
> For example, can it be changed dynamically in my RTLinux module?
>
> Thanks in advance for your consideration!
>
>
>
> -------------------------
> Shel Hoffman
> Reflective Computing
> 917 Alanson Dr
> St. Louis, MO 63132 USA
> (314) 993-6132 voice
> (314) 993-3316 fax
> [EMAIL PROTECTED]
> -------------------------
>
>
> -- [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/
--
---------------------------------------------------------
Victor Yodaiken
Finite State Machine Labs: The RTLinux Company.
www.fsmlabs.com www.rtlinux.com
-- [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/