All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Mayer <h.mayer@domain.hid>
To: Jan Kiszka <kiszka@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] RTDM & serial port
Date: Wed, 26 Oct 2005 22:17:06 +0200	[thread overview]
Message-ID: <435FE442.2090800@domain.hid> (raw)
In-Reply-To: <435FE178.1040100@domain.hid>

Hannes Mayer wrote:
[...]
> Just one further thing:
> I've modified rt_serial_uprog.c and I just open rtser0 for reading and 
> writing.
> That works, I can write to it and read data back from it, but:
> 
> In read_task_proc:
>     ret = rt_dev_ioctl(my_fd, RTSER_RTIOC_WAIT_EVENT, &rx_event );
> rt_dev_ioctl always returns -1 - it doesn't block.
[...]
> How can I get rt_dev_ioctl to block ?

AHA! Found it! :-)

There is
             if (!rtdm_in_rt_context())
                 return -EPERM;
in rt_16550_ioctl(...)

Silly me put a printf into it:
	ret = rt_task_set_mode(0, T_PRIMARY, NULL);
	[...]
	printf(RTASK_PREFIX "waiting for event\n");
	ret = rt_dev_ioctl(write_fd, RTSER_RTIOC_WAIT_EVENT, &rx_event );
so the whole thing was not in RT anymore.

Thanks again and best regards,
Hannes.


  reply	other threads:[~2005-10-26 20:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-26  3:40 [Xenomai-help] RTDM & serial port Hannes Mayer
2005-10-26  7:18 ` Jan Kiszka
2005-10-26 17:03   ` Hannes Mayer
2005-10-26 17:32     ` Jan Kiszka
2005-10-26 18:22       ` Hannes Mayer
2005-10-26 18:27         ` Jan Kiszka
2005-10-26 20:05           ` Hannes Mayer
2005-10-26 20:17             ` Hannes Mayer [this message]
2005-10-26 20:53             ` Jan Kiszka
2005-10-26 21:40               ` Hannes Mayer
2005-10-27  2:34                 ` Romain Lenglet

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=435FE442.2090800@domain.hid \
    --to=h.mayer@domain.hid \
    --cc=kiszka@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.