All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wg@domain.hid>
To: Daniel Schnell <danielsch@domain.hid>
Cc: Haukur Hafsteinsson <haukur@domain.hid>,
	xenomai-help <xenomai@xenomai.org>,
	socketcan-users@domain.hid
Subject: [Xenomai-help] Re: [Socketcan-users] Select on a RTCAN socket
Date: Wed, 23 Aug 2006 19:07:46 +0200	[thread overview]
Message-ID: <44EC8B62.8020306@domain.hid> (raw)
In-Reply-To: <DD39B5C3F4963040ADC9768BE7E430CB01081D6B@is-hdq-exchange.marel.net>

Hi Daniel,

Daniel Schnell wrote:
> Hi,
> 
>  
> 
> I wanted to use select() on a socket to find out how many messages are 
> available. I have opened this socket to access the RTCAN sockets under 
> Xenomai. According to /usr/xenomai/lib/posix.wrappers select is not 
> “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 
> descriptor.

select is not supported and cannot be used, indeed.

> Any ideas ? Is there any other way to find out, how many messages are 
> waiting ?

Select returns the sockets which have data but it does not tell you how 
many messages are waiting. You could use separate threads to read from 
sockets.

BTW: this mail is off-topic on the socketcan MLs.

Wolfgang.


       reply	other threads:[~2006-08-23 17:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <DD39B5C3F4963040ADC9768BE7E430CB01081D6B@is-hdq-exchange.marel.net>
2006-08-23 17:07 ` Wolfgang Grandegger [this message]
2006-08-23 17:21   ` [Xenomai-help] Re: [Socketcan-users] Select on a RTCAN socket Jan Kiszka
2006-08-23 17:59     ` Wolfgang Grandegger
2006-08-23 18:19       ` Wolfgang Grandegger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44EC8B62.8020306@domain.hid \
    --to=wg@domain.hid \
    --cc=danielsch@domain.hid \
    --cc=haukur@domain.hid \
    --cc=socketcan-users@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.