All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Smolorz <smolorz@domain.hid>
To: Bosko Radivojevic <bosko.radivojevic@domain.hid>
Cc: xenomai-help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] RTDM question
Date: Thu, 17 Apr 2008 13:04:17 +0200	[thread overview]
Message-ID: <48072EB1.1070102@domain.hid> (raw)
In-Reply-To: <d6c8ef150804170346t4537b9dehf448cd6c9d0debb5@domain.hid>

Bosko Radivojevic wrote:
> What could be the reason of rt_dev_open() returning 0 (zero)?
> 
> I can see that device is properly registered. When I start user-space
> program, I can see in /proc/xenomai/rtdm/filedes that one file is
> open:
> Index   Locked  Device          Owner [PID]
> 0       0       macbdev0        user [306]
> 
> But I never reach write function. rt_dev_write() & rt_dev_read() are
> returning -1.

Which read and write handlers do you have registered with your device 
(RT/NRT)? From which context do you call the RTDM functions 
(primary/secondary)?

  In API documentation, for rt_dev_open return values
> says:
> Positive file descriptor value on success, otherwise a negative error code.

I think this is a bug in the documentation. Negative values mean errors, 
all other values (including zero) success.

-- 
Sebastian


  reply	other threads:[~2008-04-17 11:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-17 10:46 [Xenomai-help] RTDM question Bosko Radivojevic
2008-04-17 11:04 ` Sebastian Smolorz [this message]
2008-04-17 11:23   ` Bosko Radivojevic
  -- strict thread matches above, loose matches on Subject: below --
2007-10-03 14:17 Perrine Martignoni
2007-10-04 21:44 ` Jan Kiszka

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=48072EB1.1070102@domain.hid \
    --to=smolorz@domain.hid \
    --cc=bosko.radivojevic@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.