Issues when running the switchtest program
int ret = rt_task_create(&my_task, "my_task", 0, 90, 0);
if (ret)
{
std::cout << "333" << std::endl;
//fprintf(stderr, "Failed to create my_task !!!! ret is: %d\n", ret);
printf("create my task error %d : %s\n",-ret,strerror(-ret));
return false;
}
pthread_create: Resource temporarily unavailable
The switchtest test creates many kernel threads, an operation which consumes memory taken from internal pools managed by the Xenomai real-time core.
Xenomai 2.x and 3.x series require CONFIG_XENO_OPT_SYS_HEAPSZ
to be large enough in the kernel configuration settings, to cope with the allocation requests.
Xenomai 2.x may also require to increase the CONFIG_XENO_OPT_SYS_STACKPOOLSZ
setting.