Re: [rtl] Limits on Interrupt Service Routine stack size?

2000-08-28 Thread yodaiken

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)
> {
> charanotherBigBuff[10];
> ...
> }
> 
> 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 " | 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 " | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/




[rtl] Limits on Interrupt Service Routine stack size?

2000-08-28 Thread Sheldon Hoffman

Does anyone know what limitations there are on the stack size of an
interrupt service routine (ISR) in RT Linux 2.2?

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)
{
charanotherBigBuff[10];
...
}

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 " | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/




Re: [rtl] Trouble upgrading to RT2.0

2000-08-28 Thread David Schleef

On Mon, Aug 28, 2000 at 11:31:41AM -0600, [EMAIL PROTECTED] wrote:
> > First: /usr/src/linux/.config
> > 
> > rtlinux-2.3-pre2: CONFIG_RTL=y
> > 
> > rtlinux-2.3-pre3: CONFIG_RTLINUX=y
> > Why was this changed?
> 
> Why is this referenced in comedi?

So that Comedi can autodetect RTLinux.  This is the reason I gave
when I convinced you to originally put it in.  Not a problem, the
autodetect script can be changed as necessary.


> > Second: linux/rtl.h: No such file or directory
> > Is there any way to detect (#ifdef) the change from  to 
> 
> It's easy to define 
> #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
> 
> We probably need a RTLINUX_VERSION_CODE too.

Wasn't this discussion about source compatibility?  Requiring that
the user modify the source code to upgrade != source
compatibility.




dave...

-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl " | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/




Re: [rtl] Trouble upgrading to RT2.0

2000-08-28 Thread yodaiken

On Mon, Aug 28, 2000 at 09:57:03AM -0700, Wayne E. Van Loon Sr. wrote:
> Hello rtl users:
> I am very interested in switching to v3 if using a debugger is possible. 
> Which debugger and is there documentation on using the debugger with
> RT-threads?
> Wayne

GDB. There is a howto.

> 
> 
> Michael Barabanov wrote:
> > 
> > Sundeep Kapila ([EMAIL PROTECTED]) wrote:
> > > Hi,
> > > On Sun, Aug 27, 2000 at 07:14:09PM +0400, Michael Barabanov wrote:
> > > > 2.2.13-rtl2.0 is very old. Please use the latest, 3.0pre6e, available
> > > > from ftp://fsmlabs.com/pub/rtlinux/v3
> > > What are the main differences ?
> > > How is v3 better ?
> > 
> > Too many things to list really; here are some points:
> > 
> > - 2.2 and 2.4 kernels support
> > - debugger for RT-threads
> > - multiple architectures (x86, ppc, alpha)
> > - posix IPC (semaphores, mutexes, condvars, etc)
> > - user-space realtime
> > - mixing RTLinux v1.x and v2.x API is now possible
> > - much less bugs
> > 
> > etc
> > 
> > Michael.
> > 
> > -- [rtl] ---
> > To unsubscribe:
> > echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> > echo "unsubscribe rtl " | mail [EMAIL PROTECTED]
> > ---
> > For more information on Real-Time Linux see:
> > http://www.rtlinux.org/rtlinux/
> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> echo "unsubscribe rtl " | 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 " | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/




Re: [rtl] Trouble upgrading to RT2.0

2000-08-28 Thread yodaiken

On Mon, Aug 28, 2000 at 06:20:50PM +0200, Tomasz Motylewski wrote:
> Well I was actually quite shocked/amazed thet you have packaged
> rtlinux30pre6c as rtlinux-2.3-pre3.tar.gz. Shocked, because it was to me like
> Linus releasing his new 2.4.3pre14 kernel as stable 2.2.19. Amazed, because
> it means you have kept source compatibility with RTL-2.0. 

We would like to maintain fewer code bases -- so backporting the kernel
dependent stuff seemed cleaner.

> But unfortunately there are some problems which prevent just taking RTL-2.0
> application (like comedi) and compiling it with rtlinux-2.3-pre3.
> 
> First: /usr/src/linux/.config
> 
> rtlinux-2.3-pre2: CONFIG_RTL=y
> 
> rtlinux-2.3-pre3: CONFIG_RTLINUX=y
> Why was this changed?

Why is this referenced in comedi?

> Second: linux/rtl.h: No such file or directory
> Is there any way to detect (#ifdef) the change from  to 

It's easy to define 
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)

We probably need a RTLINUX_VERSION_CODE too.

-- 
-
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 " | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/




Re: [rtl] Trouble upgrading to RT2.0

2000-08-28 Thread Tomasz Motylewski

On Mon, 28 Aug 2000, Michael Barabanov wrote:

> CONFIG_RTL was an oversight; sorry.
> I will add CONFIG_RTL in the next version. Meanwhile, you could 
> define CONFIG_RTL in include/compat/linux/rtl.h (yes, linux/rtl.h is there,
> it's just not in the kernel source anymore).

This will not help, it is "make config", not source code dependence. Comedi
looks in kernel's .config (Config.in script depends on it). 

> I haven't looked at comedy makefiles. The idea about building
> RTLinux applications is that the application Makefile should include
> the rtl.mk file from the RTLinux distribution that it's being compiled
> against. This file contains all paths, gcc flags etc. And the

This brings us to the question of standard location of rtl.mk file?
/usr/src/linux/include is standard, /usr/include/rtlinux is standard.
rtl.mk NOR rtlinux30pre6c/include/compat are not installed as a part
of "make install". So, my point is that system after "make install" + pached
kernel source should be enough to build and use RT modules.

Moreover imagine what happens if some application depends on more than one
package having it's .mk file. One should then at least change
CFLAGS = ...
to
CFLAGS += ...
in rtl.mk

I would understand requirement to fix makefiles going from v2.0 to v3.0.
But if you release v3.0 as v2.x YOU are responsible for keeping
compatybility. I think that in this case good fix would be to add
/usr/src/include/linux/rtl.h (same as
rtlinux30pre6c/include/compat/linux/rtl.h) to kernel_patch-2.2

We are talking about V2 (not V1) compatybility of rtlinux-2.3-pre3.tar.gz.

Best regards,
--
Tomek

-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl " | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/




Re: [rtl] Trouble upgrading to RT2.0

2000-08-28 Thread Wayne E. Van Loon Sr.

Hello rtl users:
I am very interested in switching to v3 if using a debugger is possible. 
Which debugger and is there documentation on using the debugger with
RT-threads?
Wayne


Michael Barabanov wrote:
> 
> Sundeep Kapila ([EMAIL PROTECTED]) wrote:
> > Hi,
> > On Sun, Aug 27, 2000 at 07:14:09PM +0400, Michael Barabanov wrote:
> > > 2.2.13-rtl2.0 is very old. Please use the latest, 3.0pre6e, available
> > > from ftp://fsmlabs.com/pub/rtlinux/v3
> > What are the main differences ?
> > How is v3 better ?
> 
> Too many things to list really; here are some points:
> 
> - 2.2 and 2.4 kernels support
> - debugger for RT-threads
> - multiple architectures (x86, ppc, alpha)
> - posix IPC (semaphores, mutexes, condvars, etc)
> - user-space realtime
> - mixing RTLinux v1.x and v2.x API is now possible
> - much less bugs
> 
> etc
> 
> Michael.
> 
> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> echo "unsubscribe rtl " | mail [EMAIL PROTECTED]
> ---
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/rtlinux/
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl " | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/




Re: [rtl] Trouble upgrading to RT2.0

2000-08-28 Thread Michael Barabanov

Hi Tomek,

> > - much less bugs
> 
> Well I was actually quite shocked/amazed thet you have packaged
> rtlinux30pre6c as rtlinux-2.3-pre3.tar.gz. Shocked, because it was to me like
> Linus releasing his new 2.4.3pre14 kernel as stable 2.2.19. Amazed, because
> it means you have kept source compatibility with RTL-2.0. 

Right. I did it because I consider the current 3.0pre to be more stable
than 2.3-pre2. And I'm pretty sure about source compatibility.
In fact, I'll be willing to consider fixing any incompatibilities found.

> But unfortunately there are some problems which prevent just taking RTL-2.0
> application (like comedi) and compiling it with rtlinux-2.3-pre3.
> 
> First: /usr/src/linux/.config
> 
> rtlinux-2.3-pre2: CONFIG_RTL=y
> 
> rtlinux-2.3-pre3: CONFIG_RTLINUX=y
> Why was this changed?

CONFIG_RTL was an oversight; sorry.
I will add CONFIG_RTL in the next version. Meanwhile, you could 
define CONFIG_RTL in include/compat/linux/rtl.h (yes, linux/rtl.h is there,
it's just not in the kernel source anymore).

I haven't looked at comedy makefiles. The idea about building
RTLinux applications is that the application Makefile should include
the rtl.mk file from the RTLinux distribution that it's being compiled
against. This file contains all paths, gcc flags etc. And the
include path does contain include/compat, so there should be no problem
finding linux/rtl.h. In fact, examples/v1api/parallel/rtc_toggle.c that
includes this file compiles on my system.

Michael.

PS BTW, I think this approach makes discussions on standard locations 
for RTL include files, etc irrelevant.


> Second: linux/rtl.h: No such file or directory
> Is there any way to detect (#ifdef) the change from  to 
> ?
> 
> Best regards,
> --
> Tomek
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl " | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/




Re: [rtl] Trouble upgrading to RT2.0

2000-08-28 Thread Tomasz Motylewski

On Mon, 28 Aug 2000, Michael Barabanov wrote:

> > On Sun, Aug 27, 2000 at 07:14:09PM +0400, Michael Barabanov wrote:
> > > 2.2.13-rtl2.0 is very old. Please use the latest, 3.0pre6e, available
> > > from ftp://fsmlabs.com/pub/rtlinux/v3

> - 2.2 and 2.4 kernels support
[...]
> - much less bugs

Well I was actually quite shocked/amazed thet you have packaged
rtlinux30pre6c as rtlinux-2.3-pre3.tar.gz. Shocked, because it was to me like
Linus releasing his new 2.4.3pre14 kernel as stable 2.2.19. Amazed, because
it means you have kept source compatibility with RTL-2.0. 

But unfortunately there are some problems which prevent just taking RTL-2.0
application (like comedi) and compiling it with rtlinux-2.3-pre3.

First: /usr/src/linux/.config

rtlinux-2.3-pre2: CONFIG_RTL=y

rtlinux-2.3-pre3: CONFIG_RTLINUX=y
Why was this changed?

Second: linux/rtl.h: No such file or directory
Is there any way to detect (#ifdef) the change from  to 
?

Best regards,
--
Tomek

-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl " | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/




Re: [rtl] Trouble upgrading to RT2.0

2000-08-28 Thread Sundeep Kapila

> - 2.2 and 2.4 kernels support
> - debugger for RT-threads
> - multiple architectures (x86, ppc, alpha)
> - posix IPC (semaphores, mutexes, condvars, etc)
> - user-space realtime
What does this really mean ?
User space hard real-time ?

Sundeep Kapila
> - mixing RTLinux v1.x and v2.x API is now possible
> - much less bugs
> 
> etc
> 
> Michael.
> 
> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> echo "unsubscribe rtl " | mail [EMAIL PROTECTED]
> ---
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/rtlinux/

-- 
Wise men speak from experience,
Wiser men, from experience, do not speak.
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl " | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/




Re: [rtl] Trouble upgrading to RT2.0

2000-08-28 Thread Michael Barabanov

> > - user-space realtime
> What does this really mean ?
> User space hard real-time ?

In your Linux process, you can execute code in hard-realtime
via rtlinux_sigaction.

Michael.
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl " | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/




Re: [rtl] Trouble upgrading to RT2.0

2000-08-28 Thread yodaiken

On Mon, Aug 28, 2000 at 01:39:03PM +0400, Michael Barabanov wrote:

re V3 RTLinux

> - mixing RTLinux v1.x and v2.x API is now possible

But very much discouraged and future support is not promised. This is 
a bridge out of the V1 api.


-- 
-
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 " | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/




RE: [rtl] Trouble upgrading to RT2.0

2000-08-28 Thread Stephen D. Cohen

> > What are the main differences ? 
> > How is v3 better ?
> 
> Too many things to list really; here are some points:
> 
> - 2.2 and 2.4 kernels support
> - debugger for RT-threads
> - multiple architectures (x86, ppc, alpha)
> - posix IPC (semaphores, mutexes, condvars, etc)
> - user-space realtime
> - mixing RTLinux v1.x and v2.x API is now possible
> - much less bugs
> 
> etc

And dare I add:

 - Currently in development and thus "supported" by the developers

NOTE: The quotes in the above sentence are meant only to releive the
developers of any implied support requirement, and generally indicate the
state of support on open source software.  They are most certainly *NOT*
meant to suggest that the support is anything less than excellent, which it
is.  I have never had such prompt answers to questions with any commercial
OS.

Regards,

Steve

-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl " | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/




Re: [rtl] Trouble upgrading to RT2.0

2000-08-28 Thread Michael Barabanov

Sundeep Kapila ([EMAIL PROTECTED]) wrote:
> Hi,
> On Sun, Aug 27, 2000 at 07:14:09PM +0400, Michael Barabanov wrote:
> > 2.2.13-rtl2.0 is very old. Please use the latest, 3.0pre6e, available
> > from ftp://fsmlabs.com/pub/rtlinux/v3
> What are the main differences ? 
> How is v3 better ?

Too many things to list really; here are some points:

- 2.2 and 2.4 kernels support
- debugger for RT-threads
- multiple architectures (x86, ppc, alpha)
- posix IPC (semaphores, mutexes, condvars, etc)
- user-space realtime
- mixing RTLinux v1.x and v2.x API is now possible
- much less bugs

etc

Michael.

-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl " | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/