Hello!

I have problem with binding xenomai's queue. I created queue at the kernal
space with Q_SHARED flag and binded queue at user space.

static int __init sample_module_init(void)
{
 int err;
  printk(KERN_DEBUG "init sample module device\n");
 err=rt_queue_create(&QUEUE,"Queue_msg1",1024*20,Q_UNLIMITED,Q_SHARED|Q_DMA);
 printk(KERN_DEBUG "err=%i\n",err);
 return 0;
}
and it was created correctly: err=0 and at
/proc/xenomai/registry/native/queues derictory was queue's name.

but I cannot bind queue from user space.

int main() {
 cl_err err;
 //CIniFile ini;
 int ret1,ret2,itmp=1;
 msgbuff q;
 char asd[50];

 //mlockall(MCL_CURRENT|MCL_FUTURE);

 //tasks
 rt_task_create(&Cycle1, "cycle1", 0, 90, 0);
 rt_task_create(&Cycle2, "cycle2", 0, 91, 0);

ret1=rt_queue_bind(&MsgQue1_2,"Queue_msg1",TM_INFINITE);
printf("ret=%d:%s",ret1,strerror(-ret1));

....

rt_queue_bind returns -12:cannot alocate memory.

I tried change flags and execute code from rt_task or from main.

Does anyone have similarly problem or know problem-solving?
xenomai version: 2.4.7
platform: blackfin bf537
os: uclinux
--
Dmitry Romannikov
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to