This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: use __prefixed symbols
- From: neal at cs dot uml dot edu (Neal H. Walfield)
- To: Roland McGrath <roland at frob dot com>
- Cc: libc-alpha at sources dot redhat dot com
- Date: 26 Sep 2002 11:10:33 -0400
- Subject: Re: use __prefixed symbols
- References: <200208260940.g7Q9eu922953@dhcp187.sf.frob.com>
Roland, thanks for this excellent explanation. I still have a few
doubts. For instance, if a standard specifies two functions, foo and
bar and foo is implemented in terms of bar, however relies on an
option exercised by the implementation of bar, should foo call bar or
__bar?
More concretely, say pthread_cond_wait is implemented in terms of
pthread_cond_timedwait, that is, pthread_cond_wait does:
return pthread_cond_timedwait (c, m, NULL);
POSIX does not specify what happens if the timespec is NULL (it is
undefined behavior), however, the implementation knows that
pthread_cond_timedwait interprets NULL as meaning block forever if
need be.
Is it reasonable for pthread_cond_wait to rely on
pthread_cond_timedwait to do the right thing or should
pthread_cond_wait instead call __pthread_cond_timedwait?
Thanks.