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: zonefile changes and long running processes.


OndÅej BÃlka wrote:

As we do not free a timezone string we could do same, construct
immutable structure with precomputed data that and look if there is
already such structure. It would take only one read for localtime_r
which is fast enough.

That's more like it.  But we can do even better: localtime_r can simply
look at the structure and use it, without testing whether there is already such a structure. That would avoid an unnecessary branch. If the initial version of the precomputed structure (all zeros, say?) is valid, and if localtime_r can't dump core merely because the structure is being updated by some other thread's call to tzset, this would conform to POSIX.


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