Jan Kiszka wrote:
> Gilles Chanteperdrix wrote:
>> Well I am busy with the ARM FCSE now. Do you want my test case ?
> 
> Yes, hoping that it triggers on x86 as well. And is toolchain independent.



-- 
                                            Gilles.
#include <stdio.h>

#include <sys/mman.h>
#include <pthread.h>

#include <native/task.h>

void relaxed_thread(void *cookie)
{
	rt_task_set_mode(T_PRIMARY, 0, NULL);
	for (;;)
		;
}

int main(void)
{
	struct sched_param p;
	RT_TASK tid;

	mlockall(MCL_CURRENT | MCL_FUTURE);
	
	p.sched_priority = 99;
	pthread_setschedparam(pthread_self(), SCHED_FIFO, &p);

	rt_task_spawn(&tid, "relax", 65536, 12, 0, relaxed_thread, NULL);
	sleep(1);

	rt_task_suspend(&tid);
	sleep(1);

	exit(EXIT_SUCCESS);
}
_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to