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: Thread-, Signal- and Cancellation-safety documentation


On 03/26/2013 07:43 AM, Rich Felker wrote:
I know your work is just documenting existing practice, but unless
there's a clause in POSIX (and now, C11 too, since C11 has threads)
which allows this, I think the underlying issue should be fixed. The
cleanest fix I can envision would be atomically replacing the pointer
to the locale object once the new one is prepared. This would
eliminate the need for readers to lock anything.

So we don't deallocate locale data, ever?  Then this might work.

Straightforward rwlocks for the character classification functions wouldn't work because even a shared lock results in hardware-level contention, killing performance.

--
Florian Weimer / Red Hat Product Security Team


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