From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <44EC8EAB.8010201@domain.hid> Date: Wed, 23 Aug 2006 19:21:47 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <44EC8B62.8020306@domain.hid> In-Reply-To: <44EC8B62.8020306@domain.hid> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigBF4195FCD1A4E4E9BA1A3043" Sender: jan.kiszka@domain.hid 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: Wolfgang Grandegger Cc: Haukur Hafsteinsson , xenomai-help , socketcan-users@domain.hid, Daniel Schnell This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigBF4195FCD1A4E4E9BA1A3043 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Hi all, Wolfgang Grandegger wrote: > Hi Daniel, >=20 > Daniel Schnell wrote: >> Hi, >> >> =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 >> "supported" by the realtime kernel. Accordingly it doesn't work. If i = >> start the according task under SCHED_FIFO, the task simply hangs when = >> initiating select(), in SCHED_OTHER it is simply returning: bad file=20 >> descriptor. >=20 > select is not supported and cannot be used, indeed. And select is tricky to provide under hard-RT constraints. >=20 >> Any ideas ? Is there any other way to find out, how many messages are = >> waiting ? >=20 > 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 = > sockets. >=20 > BTW: this mail is off-topic on the socketcan MLs. Mmh, do you mean it the other way around? Anyway, is there a mechanism of the standard socket API the obtain the current incoming queue length? Don't think so actually, but it wouldn't be the first time I'm blind. Jan --------------enigBF4195FCD1A4E4E9BA1A3043 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE7I6rniDOoMHTA+kRAqTZAJwPAn9ojy7xoTj7cDyyDQ0bk+xZvACeKtWj nHzb27doxl/+p4n5R4mqRLU= =c0zT -----END PGP SIGNATURE----- --------------enigBF4195FCD1A4E4E9BA1A3043--