This is the mail archive of the libc-alpha@sourceware.org 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: Gsoc 2014 project proposal


2014-02-27 9:02 GMT+01:00 Rich Felker <dalias@aerifal.cx>:
> I think your use of the word "userspace" is somewhat imprecise; if
> you're using it to mean that libpthread is something outside of "the
> implementation" and in the domain of what applications can
> override/replace, you're wrong. Formally (wrt POSIX), the pthread
> functions are just as much a part of the implementation as stdio,
> locale, etc. With regards to implementation, glibc (including its
> dynamic linker) assumes properties of its own implementation of
> pthreads. Long long ago there was a time when you could treat it like
> a "third party library" and swap out one libpthread for another; the
> only reason this was possible is that none of them were removely
> correct with regard to POSIX semantics.
>
> What Joseph meant about namespaces is that pure ISO C applications
> which are not written to POSIX are not forbidden from using the
> pthread_* namespace for their own purposes, possibly defining external
> functions which would seem to conflict with pthreads. This does not
> make it valid to interpose alternate pthread implementations in a
> program using anything from POSIX that's not in ISO C; rather it just
> means these identifiers are not "special" with respect to ISO C, and
> thus an implementation where programs written to plain ISO C end up
> indirectly referencing these non-reserved identifiers as part of
> calling standard functions is non-conforming.
>
> Rich

Ok, but for ISO C POSIX threads are just a "third party library". For
"userspace" i mean that pthread is separate from the standard core
library ( and its implementaton ) since, as you notice, one can use
posix names as they want in standard C. I know this definition is
incorrect since even the glibc is "real" userspace code, but i think
it could give the idea that, for ISO C, POSIX is a simple external
library and not something reserved and i should treat it as that.
Since i' ll use pthread function for the implementation of some
standard functions, i can' t reserve posix functions/types names and,
if i get it right, this is my problem.

-- 
Andrea Francesco Iuorio
Student in Computer Science, Università degli Studi di Milano
andreafrancesco.iuorio@gmail.com - GPG Key


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