---On Thu, 25 May 2000 14:42:10 -0300, WORM said
> Hi people of the RTL world
>
> I�m reading the time from the kernel by the gethrtime function in a
> variable of type hrtime_t. I wanto to pass this value to a linux
> aplication by means of a fifo. The rtf_put function requires a char *
> buffer in its second argument.
> I want to know if it�s possible to convert the hrtime_t variable to
> ascii (char *) in the kernel in order to use rtf_put function?
> In case that is not possible, how can I pass this value to the fifo.?
> Is it possible or I should use shared memory or something else?
>
> Thanks, Gustavo
Gustavo:
The simplest way is to 'write(fifo, &(hrtime_t variable),
sizeof(hrtime_t);' Note that the best way then to receive this value is
the inverse 'read(fifo, &(some var), sizeof(the var);'
It's pretty easy to get into trouble if your bytes get out of sync.
--re: [rtl] TIME TO ASCII INTO THE KERNEL?
Chris
#include <stddisclaimer.h>
Christopher R. Hawks
Software Engineer
Syscon Plantstar a
Division of Syscon International
[EMAIL PROTECTED]
Computers are like air-conditioners:
They stop working properly when you open windows.
Linux: The OS for people with an IQ over 98
-- [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/rtlinux/