From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <44EC8B62.8020306@domain.hid> Date: Wed, 23 Aug 2006 19:07:46 +0200 From: Wolfgang Grandegger MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable Subject: [Xenomai-help] Re: [Socketcan-users] Select on a RTCAN socket List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Daniel Schnell Cc: Haukur Hafsteinsson , xenomai-help , socketcan-users@domain.hid Hi Daniel, Daniel Schnell wrote: > Hi, >=20 > =20 >=20 > I wanted to use select() on a socket to find out how many messages are=20 > available. I have opened this socket to access the RTCAN sockets under=20 > Xenomai. According to /usr/xenomai/lib/posix.wrappers select is not=20 > =93supported=94 by the realtime kernel. Accordingly it doesn=92t work. = If i=20 > start the according task under SCHED_FIFO, the task simply hangs when=20 > initiating select(), in SCHED_OTHER it is simply returning: bad file=20 > descriptor. select is not supported and cannot be used, indeed. > Any ideas ? Is there any other way to find out, how many messages are=20 > waiting ? Select returns the sockets which have data but it does not tell you how=20 many messages are waiting. You could use separate threads to read from=20 sockets. BTW: this mail is off-topic on the socketcan MLs. Wolfgang.