Anders Blomdell wrote:
> With xenomai-2.4.2 and rtnet-0.9.10, is it expected that the following code:
>
> ...
> mlockall(MCL_CURRENT|MCL_FUTURE);
> rt_task_shadow(&task_self, NULL, 1, T_FPU);
> fd = rt_dev_socket(AF_PACKET, SOCK_DGRAM, 0);
> if (fd < 0) {
> fprintf(stderr, "failed to create socket %d\n", fd);
> exit(1);
> }
> ...
>
> fails with the message "failed to create socket -12", while the following
> works
> as expected:
>
> ...
> mlockall(MCL_CURRENT|MCL_FUTURE);
> rt_task_shadow(&task_self, NULL, 1, T_FPU);
> rt_task_set_mode(T_PRIMARY, 0, 0);
> fd = rt_dev_socket(AF_PACKET, SOCK_DGRAM, 0);
> if (fd < 0) {
> fprintf(stderr, "failed to create socket %d\n", fd);
> exit(1);
> }
> ...
Yes, this is an RTnet artifact. Check rtnet/Documentation/README.pools
on details how to prepare rt-socket creation from primary domains - but
generally you don't want this, and RTnet will sooner or later remove the
related support (and source of confusion).
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help