check for CLOCK_MONOTONIC

James Peach jpeach at samba.org
Thu Jun 8 06:28:32 GMT 2006


On Thu, 2006-06-08 at 11:13 +1000, James Peach wrote:
> On Wed, 2006-06-07 at 13:01 +0200, Björn JACKE wrote:
> > Hi,
> > 
> > On 2006-06-07 at 12:48 +1000 James Peach sent off:
> > >I rejiggered your patch a bit, can you please re-test before I commit?
> > 
> > The checks for available clocks are not being done and even HAVE_CLOCK_GETTIME is undef'ed:
> > 
> > ...
> > checking for clock_gettime... no
> > checking for clock_gettime in -lrt... yes
> > checking if libpthread is linked... yes
> > checking for va_copy... yes
> > ...
> > 
> > but config.h says:
> > 
> > /* Whether clock_gettime is available */
> > /* #undef HAVE_CLOCK_GETTIME */
> 
> This is actually correct. If linking librt caused libpthread to also be
> linked, then we run into a problem with the use of signals with kernel
> oplocks on Linux (see the thread titled "Failed to setup
> RT_SIGNAL_NOTIFY handler").

Hmmm .... --with-aio-support will also cause librt (and therefore
possibly libpthread) to be linked. So presumably this will also trigger
the RT_SIGNAL_NOTIFY problem.

Unfortunately, at the point where we call SMB_IS_LIBPTHREAD_LINKED, we
don't know whether llibpthread was linked because of clock_gettime or
because of --with-aio-support. In the latter case undoing the addition
of -lrt to $LIBS will make linking smbd fail.

The attached patch disables AIO support if it requires linking
libpthread. Jeremy, do you want this in?

-- 
James Peach | jpeach at samba.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: prevent-aio-linking-libpthread
Type: text/x-patch
Size: 10755 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20060608/988d7576/prevent-aio-linking-libpthread.bin


More information about the samba-technical mailing list