From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <485B8C73.4060102@domain.hid> Date: Fri, 20 Jun 2008 12:54:43 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <4829613B.3000500@domain.hid><0C9896A4B6D338488AD6FFFE58BAEF100276DBF6@domain.hid><48297566.1010607@domain.hid><0C9896A4B6D338488AD6FFFE58BAEF100276DC66@domain.hid> <4829AA19.8070405@domain.hid> <0C9896A4B6D338488AD6FFFE58BAEF100276DD0C@serveur3.lgm.com> <4829C8C9.4020300@domain.hid> <0C9896A4B6D338488AD6FFFE58BAEF100276DDDE@serveur3.lgm.com> <482B3BCF.8090700@domain.hid> <482B3EE5.9030702@domain.hid> <0C9896A4B6D338488AD6FFFE58BAEF100276E025@domain.hid> <482D33B3.9070700@domain.hid> <0C9896A4B6D338488AD6FFFE58BAEF100276E212@domain.hid> <482D6FF9.3050008@domain.hid> <482D82EB.3050608@domain.hid> <482D885A.7080706@domain.hid> <482D8B50.5090502@domain.hid> <482DCAD0.1010408@domain.hid> <485AB64D.4020009@domain.hid> In-Reply-To: <485AB64D.4020009@domain.hid> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai-help] Weird rt_dev_socket behaviour List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anders Blomdell Cc: xenomai-help 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