[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: [rtl] Callbacks in RTL?
- Subject: Re: [rtl] Callbacks in RTL?
- From: Zdenek Kabelac <kabi@fi.muni.cz>
- Date: Thu, 13 Aug 1998 12:38:42 GMT
- Newsgroups: cz.muni.redir.rtlinux
- Organization: unknown
- References: <ExL97M.vL@news.muni.cz>
Mark Huang wrote:
>
> Hi,
>
> I'm a new user, so please bear with me. Is it possible for an RTL
> process to call a function defined in user space? Ideally, by passing
> a user callback function to the RT process for it to execute?
>
> From reading the documentation and browsing the list archives, I'm
> pretty convinced that the answer is no, but I thought I'd ask to make
> certain. I tried passing pointers to user-space functions to my RT
> process through both RT-FIFOs and shared memory; neither worked. I'm
> supposing it's because the RT process is just calling garbage memory
> out of context--is there a way to effectively define a function
> in shared memory?
I'm solving quite a simmilar problem, and as far as I know
there is no simple solution. For _User_Space_Process you might
try to use SCHED_FIFO scheduler which might improve performace
a little but there is no help against command like
this one: cat </dev/zero >/tmp/xxx - this will definitely
make quite a big delays between USP scheduling (100Hz I suppose)
Also you might try this funny idea:
Mark process' "current" pointer of your desired process in user space
and when you are in RTL task and "current" matches the "remembered current"
you have the same memory space as your USP,
but as this is quite a big hack and it need that USP process is always
running I suppose its quite useless.
What is relatively easy is to allocate shared memory between RTL task
and USP and communicating with RT_FIFO. But you can't expect
you will catch all impulses of RTL task in your USP especially
on loaded system.
-----
Maybe this could help some other people:
Make sure you have DMA transfer & keepsettings turned ON on your HD
(hdparm -v) - this will greatly improve performance of your RTL tasks
on IDEonly machines.
I believe this should be written somewhere in RTLmanuals explicitely.
--
Zdenek Kabelac http://www.fi.muni.cz/~kabi/ kabi@fi.muni.cz
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail majordomo@rtlinux.cs.nmt.edu OR
echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.cs.nmt.edu