cvs commit: src/lib/libc/gen errlst.c src/lib/libc/i386/sys cerror.S ptrace.S src/lib/libc/sys __error.c src/lib/libc_r/sys uthread_error.c src/lib/libc_r/uthread ...

Joerg Sonnenberger joerg at
Tue May 3 13:07:57 PDT 2005

On Tue, May 03, 2005 at 10:00:24PM +0200, Jonas Trollvik wrote:
> I dont understand what the difference is between it, is there a good
> place where I can get more information about it?
> -Jonas

The first version uses a static buffer for all threads. That's safe
as long as only one thread uses the function at a time. This can be
done e.g. with explicit locking around the calls.

The second version uses a thread-local buffer, each thread acceses
his own buffer and doesn't collidate with the others.

The problem is, that using locking is perfectly fine, but often not
done. So this is about conforming to standards vs. preventing possible


More information about the Commits mailing list