>   What happens if the the stack size is not at the
> good size (too big or not enough) when I init a RT
> task ?

On my experience, if the stack size to small the system rebbots imediatly 8(. I
got very seldom an Oops. If the stack too big, you waste memory IMO. Default is
4096 Byte I believe.

>   How may I choose this size, I mean what is the
> relation between the code I have to execute and the
> size I have to give ?

Mmmh, here I can't help.

Generell you can use:

#define THREAD_STACK_SIZE       8192 
...
pthread_t rt_thread;
...
int init_module()
{
  pthread_attr_t attr;
  struct sched_param sched_param;
  ...
  pthread_attr_init(&attr);
  pthread_attr_setstacksize(&attr, THREAD_STACK_SIZE);
  sched_param.sched_priority = 1;
  pthread_attr_setschedparam(&attr, &sched_param);
 ...
}
-- [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/

Reply via email to