[LinuxPPS] push sys/timepps.h into glibc ?

Hal V. Engel hvengel at gmail.com
Fri Jul 8 23:09:16 CEST 2011


On Monday, May 16, 2011 02:13:00 AM Vitezslav Samel wrote:
> 	Hi!
> 
>   As of kernel 2.6.38 there is complete pps support in linux kernel.
> Is there any work on pushing new include file sys/timepps.h into glibc?
> 
>   This new include file lives in git://github.com/ago/pps-tools.git.
> 
>   This step will complete all needed support for ntp with pps on linux.
> 
> 
> 	Thanks,
> 		Vita

Is the header file in git up to date?  The version in GIT has the following:

static __inline int time_pps_kcbind(pps_handle_t handle,
					const int kernel_consumer,
					const int edge, const int tsformat)
{
	/* LinuxPPS doesn't implement kernel consumer feature */
	errno = EOPNOTSUPP;
	return -1;
}

So this can't be correct with for 2.6.38 with kernel consumer support.  I have 
another version on my machine that has:

#ifdef PPS_KC_BIND

static __inline int time_pps_kcbind(pps_handle_t handle,
					const int kernel_consumer,
					const int edge, const int tsformat)
{
	struct pps_bind_args __bind_args;

	__bind_args.tsformat = tsformat;
	__bind_args.edge = edge;
	__bind_args.consumer = kernel_consumer;

	return ioctl(handle, PPS_KC_BIND, &__bind_args);
}

#else /* !PPS_KC_BIND */

static __inline int time_pps_kcbind(pps_handle_t handle,
					const int kernel_consumer,
					const int edge, const int tsformat)
{
	/* LinuxPPS doesn't implement kernel consumer feature */
	errno = EOPNOTSUPP;
	return -1;
}

#endif /* PPS_KC_BIND */

But I don't know where I got it or even when for that matter although the file 
is dated Jun 17, 2010.  Is this correct for the current kernels or am I using 
the wrong header file?   If it is wrong where do I get the correct one?  

This does need to be cleared up at some point so that people get the correct 
header file.  Either this header file needs to be part of glibc or it needs to 
be in a formalized package so that distros can easily find it and include it.  
Right now this header is totally obscure to the disto maintainers and none of 
them know about it at this point. 

Hal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ml.enneenne.com/pipermail/linuxpps/attachments/20110708/99f862cc/attachment.htm 


More information about the LinuxPPS mailing list