Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Jun 2007 18:37:41 -0700
From:      Steve Kargl <sgk@troutmask.apl.washington.edu>
To:        Craig Rodrigues <rodrigc@crodrigues.org>
Cc:        deischen@freebsd.org, freebsd-current@freebsd.org, davidxu@freebsd.org
Subject:   Re: Undefined symbol timer_delete()?
Message-ID:  <20070617013741.GA28285@troutmask.apl.washington.edu>
In-Reply-To: <20070616215506.GA87160@crodrigues.org>
References:  <20070616203624.GA37899@crodrigues.org> <20070616205434.GA26966@troutmask.apl.washington.edu> <20070616215506.GA87160@crodrigues.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jun 16, 2007 at 05:55:06PM -0400, Craig Rodrigues wrote:
> On Sat, Jun 16, 2007 at 01:54:34PM -0700, Steve Kargl wrote:
> > mobile:kargl[205] cc -o z j.c -lrt
> > 
> > It appears that the manpage is wrong
> > 
> > LIBRARY
> >      Standard C Library (libc, -lc)
> 
> Thanks, yes the man page is wrong, timer_delete() and friends
> are in librt not in libc.
> 
> It looks like similarly the man pages for
> mq_open() and friends are wrong, because mq_* exist in librt, not
> in libc.
> 
> Do the aio_* functions in this library augment or replace those
> in libc?
> 

I'm not sure.  I know the timer_delete function is defined as
a weak symbol

mobile:kargl[205] find . -type f | xargs grep timer_delete
...
./librt/timer.c:extern int __sys_ktimer_delete(int);
./librt/timer.c:__weak_reference(__timer_delete, timer_delete);
./librt/timer.c:__weak_reference(__timer_delete, _timer_delete);
./librt/timer.c:__timer_delete(timer_t timerid)

which I believe means it can be overridden.  Looking at librt/aio.c
shows 

__weak_reference(__aio_read, _aio_read);
__weak_reference(__aio_read, aio_read);
__weak_reference(__aio_write, _aio_write);
__weak_reference(__aio_write, aio_write);
__weak_reference(__aio_return, _aio_return);
__weak_reference(__aio_return, aio_return);
__weak_reference(__aio_waitcomplete, _aio_waitcomplete);
__weak_reference(__aio_waitcomplete, aio_waitcomplete);
__weak_reference(__aio_fsync, _aio_fsync);
__weak_reference(__aio_fsync, aio_fsync);

David Xu can probably answer your question, but I haven't
seen a recent email from him.

-- 
Steve



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070617013741.GA28285>