From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] Hardware I/O from Userspace
Date: Wed, 16 Oct 2013 19:14:11 +0200 [thread overview]
Message-ID: <525EC963.2000005@xenomai.org> (raw)
In-Reply-To: <CAEk6gTAj51aYJiCLVx+4-O_tnxfyyPvtLZO-hFVZvS+WjBpDtg@mail.gmail.com>
On 10/16/2013 06:06 PM, Drasko DRASKOVIC wrote:
> Hi all,
> I would like to access to various peripheral and CPU regs of my FPGA
> from userspace.
>
> Is mmap of /dev/mem best way to it, or I should do it from kernelspace
> via kernel module?
Hi,
The RTDM kernel module is the recommended way, among other things, it may
be used to prevent several applications to access the registers at the
same time.
>
> I am looking at examples/common/hw_direct_io.c of Xenomai examples.
> Can somebody explain me how Xenomai is used in this case, as I see
> only standard pthread interface. Was this patched by Xenomai patches?
> I do not see calls to RT tasks or some other Xenomai-related API.
>
> I can see:
> struct sched_param param;
>
> printf("%s: %s %s\n", __FUNCTION__, __DATE__, __TIME__ );
> param.__sched_priority = 99;
> res = pthread_setschedparam(pthread_self(), SCHED_FIFO, ¶m);
>
> How these lines affect Xenomai?
Xenomai has more skins than just the native skin, it has notably a
POSIX skin which attempts to implement the POSIX API. How
pthread_setschedparam is hijacked by Xenomai is explained here:
https://www.xenomai.org/index.php/Porting_POSIX_applications_to_Xenomai#Compilation_flags
Regards.
--
Gilles.
next prev parent reply other threads:[~2013-10-16 17:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-16 16:06 [Xenomai] Hardware I/O from Userspace Drasko DRASKOVIC
2013-10-16 17:14 ` Gilles Chanteperdrix [this message]
2013-10-17 14:57 ` Drasko DRASKOVIC
2013-10-17 15:00 ` Lennart Sorensen
2013-10-17 15:08 ` Drasko DRASKOVIC
2013-10-17 15:05 ` Drasko DRASKOVIC
2013-10-17 18:39 ` Gilles Chanteperdrix
2013-10-18 16:30 ` Drasko DRASKOVIC
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=525EC963.2000005@xenomai.org \
--to=gilles.chanteperdrix@xenomai.org \
--cc=drasko.draskovic@gmail.com \
--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.