[LinuxPPS] Changing the syscalls
Rodolfo Giometti
giometti at enneenne.com
Mon Jul 2 22:11:41 CEST 2007
On Mon, Jul 02, 2007 at 01:50:28PM -0600, clemens at dwf.com wrote:
>
> So not knowing what time_t looks like, I would agree with your solution
> of using something better behaved for the transmission from user/kernel.
> My initial assumption would be that a long int would be appropriate, that
> should take care of times for a while... (well 100 years)...
Linux gurus suggested to me using __u32 or __u64 which are fixed data
types across different architectures and avoiding in using long which
is not fixed while passing from 32 to 64 bits.
I think better choise with an easy implementation for both
architectures could be:
struct pps_timespec {
__u32 sec;
__u32 nsec;
};
These structure is suitable for both 32 and 64 bits.
Ciao,
Rodolfo
--
GNU/Linux Solutions e-mail: giometti at enneenne.com
Linux Device Driver giometti at gnudd.com
Embedded Systems giometti at linux.it
UNIX programming phone: +39 349 2432127
More information about the LinuxPPS
mailing list