First off, Michael thanks for your answers.

> > By atomic, I mean non-divideble - i.e. You put something of size 30B in
> > RTFx from userspace, and when the handler get woken theres 30B in the RTFx.
> 
> Kernel rtf_put and user-space write are atomic in this sense.
> rtf_get or a user-space read may return with less data than requested
> if there's not enough data in the FIFO.

Thats not really my question, I'll try again:
If a userspace task only writes blocks of 30 bytes to an RTF-fifo, and the
rtl taks reads blocks of 30 bytes, can the task then return a read with
less than 30 bytes? 
I.e. are the data from the userspace "committed" to
the fifo partly ? 
Also of intrest: When is the rtf-handler woken? 
At the end of operations
on the fifo - bucause that would gice the false effect of an atomic fifo,
allthough it might not be. 

> > > How can I tell if the stack runs out [has run out - overwrite kernelspace
> > > - whatever], and how can I increase the size
> > > dynammicly?
> 
> In the current version, there's no such mechanizm. This could be solved
> by allocating an unmapped page right above the RTLinux thread structure
> on the stack. Patches are welcome..

I think I'll write a simple initialising/cleanup routine for RTL, where
the stack-dataareas is initilised with bytes like "01010101", and in the
end a simple funcktion can traverse the stackarea, and *estimate* what the
maximum peak stackallocation was during runtime [can ofcourse allso be
called in the thread]. Theres no way of trapping memoryviolations in
kernelspace, and the idea above should be sufficent for most
debugging purposes.

Actually my insight into how the c-compile works is not sufficient, but I
think you should be able to access the current stackpointer for the
thread, and compare it with the starting adress of the thread-stack to get
the current usage.

BTW Michael: when you write the note about stacksize, dont forget to
mention the effect of allocating varibles as 'static', as a hint to
newbies such as myself.

Regards
        Nicolai Hanssing
        Denmark 

----- End of forwarded message from [EMAIL PROTECTED] -----
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/

Reply via email to