This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: use __prefixed symbols


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]