Hello,

I raise a problem encountered and always present. Before on this configuration
:

- linux kernel : 2.6.29.6
- adeos patch : adeos-ipipe-2.6.29-arm-1.13-00.patch
- xenomai : 2.4.8
- host linux distribution : ubuntu 10.04 (64 bits)
- compiler : gcc 4.2.1 (buildroot's generated toolchain)

And it is always present with this configuration :

- Linux kernel : 2.6.37
- Adeos patch : adeos-ipipe-2.6.37-x86-2.9-00.patch
- Xenomai : 2.5.6
- Host Linux distribution : Ubuntu 10.04
- Compiler : gcc-4.4.3

Configuration of kernel:

I used the default configuration of Ubunut 10.04 and i change this:
In "Power management and ACPI options" :
- deactivate APM
- deactivate CPU frequency scaling
- deactivate ACPI
- deactivate CPU idle PM support
In "Device drivers/Input device support/Miscelaneous devices":
- deactivate PC Speaker support
In "Processor type and features":
- deactivate HPET_TIMER
- deactivate Enable -fstack-protector buffer overflow detection
(EXPERIMENTAL)


We encounter a problem in a particular situation. In the attached
source, when we change the value passed to rt_task_sleep (line 36), the
program never returns.

This appears only with values greater or equal to 100000 (and maybe some
other values between 10000 and 100000) and only when we use
rt_task_sleep between the two rt_task_spawn calls.

Is there something we've done wrong ? A problem with the kernel
configuration? Or a bug of Xenomai ?


Adrien LemaƮtre.
#include "utils.h"
#include <assert.h>
#include <stdio.h>
#include <native/task.h>
#include <native/queue.h>
#include <sys/mman.h>

int Counter1=0;
int Counter2=0;
volatile int test1=0;
volatile int test2=0;

void WorkingTask1()
{
	while(test1==0)
	{
		Counter1++;
	}
}

void WorkingTask2()
{ 
	while(test2==0)
	{
		Counter2++;
	}
}

void go ()
{
	RT_TASK Rt_Working_task1;
	RT_TASK Rt_Working_task2;

	rt_task_spawn (&Rt_Working_task1, "WorkingTask1", DEFAULT_STACK_SIZE,10, T_FPU|T_JOINABLE, &WorkingTask1, NULL);
  
  rt_task_sleep(100000); // does not work
  //rt_task_sleep(10000);  // works

	rt_task_spawn (&Rt_Working_task2, "WorkingTask2", DEFAULT_STACK_SIZE, 20, T_FPU|T_JOINABLE, &WorkingTask2, NULL);

	test1=1;
	test2=1;
}

int main (void)
{
  RT_TASK Rt_main_task;
  int error;

  error = mlockall( MCL_CURRENT | MCL_FUTURE );
  assert (error == 0);

  error = rt_task_spawn (&Rt_main_task, "go", DEFAULT_STACK_SIZE, 50, T_FPU | T_JOINABLE, &go, NULL);
  assert (error == 0);

  error = rt_task_join(&Rt_main_task);
  assert (error == 0);
  
  printf("End program\r\n");
  
  return 0;
}
_______________________________________________
Xenomai-help mailing list
Xenomai-help@gna.org
https://mail.gna.org/listinfo/xenomai-help

Reply via email to