All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] read returns more bytes than requested?
@ 2006-09-11 22:45 Jeff Webb
  2006-09-12  7:18 ` Philippe Gerum
  2006-09-14 13:09 ` Philippe Gerum
  0 siblings, 2 replies; 4+ messages in thread
From: Jeff Webb @ 2006-09-11 22:45 UTC (permalink / raw)
  To: Xenomai help

I am having some success porting my RTLinux application, but I have encountered a strange error.

I have this snippet of code that is reading data from an rtai-skin FIFO:

  result = read(runtime2io_fd, &resp, sizeof(resp));
  if (result != sizeof(resp))
    {
      printf("requested %d bytes, got %d\n", sizeof(resp), result);
      snprintf(err_str, MAX_STR_LEN, "cannot read response from %s",
               RUNTIME2IO_FIFO_DEV);
      sim_halt(err_str);
      return;
    }

I get the following output:

  requested 312 bytes, got 1220
  halting the sim: cannot read response from /dev/rtf1

I didn't think that a read could return more bytes than was requested.  Does anyone understand this behaviour?  This is code that works under RT-Linux.  I am trying to determine why it is working differently under xenomai.

-Jeff


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-09-14 19:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-11 22:45 [Xenomai-help] read returns more bytes than requested? Jeff Webb
2006-09-12  7:18 ` Philippe Gerum
2006-09-14 13:09 ` Philippe Gerum
2006-09-14 19:12   ` Jeff Webb

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.