DragonFly commits List (threaded) for 2005-05
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: cvs commit: src/lib/libc/gen Makefile.inc errlst.c src/lib/libc/i386/sys cerror.S ptrace.S src/lib/libc/sys Makefile.inc __error.c src/lib/libc_r/sys Makefile.inc uthread_error.c src/lib/libc_r/uthread Makefile.inc ...
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
bugs.
Joerg
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]