Ignacio García Pérez wrote:
The subject pretty much explains it all.

Just try to create a task named "foo" and a queue also named "foo".

Tested in 2.1.1 and svn HEAD.


I can't reproduce it with the attached simple test. rt_queue_create() returns -EEXIST as expected. Do you have any test frag to reproduce it?

--

Philippe.
#include <sys/types.h>
#include <sys/mman.h>
#include <string.h>
#include <stdlib.h>
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
#include <native/task.h>
#include <native/queue.h>

RT_TASK task;

RT_QUEUE q;

void queuer (void *x)

{
    int err;

    err = rt_queue_create(&q,"foo",16*1024,Q_UNLIMITED,Q_FIFO);
    printf("rt_queue_create() = %d, mapaddr=%p, mapsize=%u\n",err,q.mapbase,q.mapsize);
    err = rt_queue_delete(&q);
    printf("rt_queue_delete() = %d, mapaddr=%p, mapsize=%u\n",err,q.mapbase,q.mapsize);
}

int main (int argc, char **argv)

{
    mlockall(MCL_FUTURE|MCL_CURRENT);
    rt_task_create(&task,"foo",0,2,T_FPU);
    rt_task_start(&task,&queuer,(void *)(argc > 1));
    pause();
    exit(0);
}
_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to