On Wed, 2007-09-05 at 16:18 +0200, rtos wrote:
> Hello
> I am new in Xenomai and I can't figure out from examples what is the best way 
> to send some data from kernel space rt_task to user space rt_task. I have 
> created both tasks. In the kernel space task I've created rt_queue and I 
> would like bind to it from the user space kernel task but all I've got is 
> -EPERM?? I cannot figure out why it happens?
> best regards
> Marcin Piatek

[snip]

> */
> static int base_address_init(void) {
>     int err;
> 
>     if ((err = pci_register_driver(&pci_driver)))
>         return err;
> 
>     if ((err = rt_queue_create(&my_queue, "MyQueue", sizeof(int)*1000, 1000, 
> Q_FIFO))) {

- if ((err = rt_queue_create(&my_queue, "MyQueue", sizeof(int)*1000, 1000, 
Q_FIFO)))
+ if ((err = rt_queue_create(&my_queue, "MyQueue", sizeof(int)*2000, 1000, 
Q_FIFO|Q_SHARED)))

You need to define a shared queue in order to share the memory pool
between kernel and userland. The pool size should also be raised a bit
since there is a minimum value in this case.

$ cat /proc/xenomai/registry/native/queues/MyQueue
to find more about the object you have just created.
In the former case, the queue type was defined as "local", which is not
what you want.

-- 
Philippe.



_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to