Tcl Source Code

View Ticket
Login
Ticket UUID: 424119
Title: reentrant time functions patch
Type: Patch Version: None
Submitter: hobbs Created on: 2001-05-15 02:04:46
Subsystem: 06. Time Measurement Assigned To: kennykb
Priority: 3 Low Severity:
Status: Closed Last Modified: 2001-06-04 22:54:36
Resolution: Fixed Closed By: kennykb
    Closed on: 2001-06-04 15:54:36
Description:
This is a patch from Simon Hefti @ NetCetera for use 
of reentrant time functions.  Kevin did some work in 
this area, but wanted to see this patch (which touched 
some different bits).
User Comments: kennykb added on 2001-06-04 22:54:36:
Logged In: YES 
user_id=99768

The patches fix a re-entrancy problem in a different way.
The code on the current HEAD fixes TclpGetDate by making sure that the 'struct time_t' that it returns by 
pointer is in thread-specific data, while the submitted patch works by forcing the caller to provide a buffer.
The way that the current HEAD does it has the advantage that it preserves the type signature of all the 
calls, hence any extension that includes "tclInt.h" and calls TclpGetDate will continue to work.  It does 
require one more thread-specific buffer, but this seems a small price to pay.

hobbs added on 2001-05-15 09:04:47:

File Added - 6301: rentrant_time_functions_patch.txt

Attachments: