From: Philippe Gerum <rpm@xenomai.org>
To: Sean McGranaghan <smm@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Getting calling task id inside RTDM driver
Date: Sun, 16 Apr 2006 16:03:25 +0200 [thread overview]
Message-ID: <44424EAD.1080707@domain.hid> (raw)
In-Reply-To: <443FB205.6010400@domain.hid>
Sean McGranaghan wrote:
> Hello all,
>
> I am writing an RTDM driver that needs a simple task suspend/resume. I
> have a simple ioctl() that needs to initiate some io and then sleep
> until an interrupt occurs. I have been trying to use rt_task_suspend()
> and rt_task_resume(). I tried to save the calling task id using
> rt_task_self() inside open(). When I try to suspend the task in the
> ioclt() rt_task_suspend() returns an EINVAL. (I looked at the code and
> it appears to fail a magic number test.)
>
Object descriptors must be exclusively used in the execution space (i.e.
kernel or user) they have been obtained from. Those descriptors are only
containers of some data pointing at the indexed object, therefore they
can be mapped at distinct addresses whilst still representing the same
object -- and they actually do when they belong to different execution
spaces.
> I then compared the calling task id before the open() to the task id
> inside open() and they are different. Is there a way to retrieve the
> calling task id without explicitly sending it to the ioctl()?
suspend/resume are going to be racy for synchronization purpose. It
would be better to use RTDM services (e.g. sema4s), which would fix the
current issue in the same move.
>
> Sean
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
--
Philippe.
prev parent reply other threads:[~2006-04-16 14:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-14 14:30 [Xenomai-help] Getting calling task id inside RTDM driver Sean McGranaghan
2006-04-14 19:55 ` Sebastian Smolorz
2006-04-17 12:27 ` Sean McGranaghan
2006-04-17 13:18 ` Jan Kiszka
2006-04-16 14:03 ` Philippe Gerum [this message]
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=44424EAD.1080707@domain.hid \
--to=rpm@xenomai.org \
--cc=smm@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.