Artifact 1affa0d1cb116c4f4a92a031d4aa926e7eef8190b0f690dd8995d4affbbb4259:
- File
tip/134.tip
— part of check-in
[c9e8bb0923]
at
2004-06-04 18:12:52
on branch trunk
— Withdrawn at Author request. From his request...
>Although I still think it's valid in the corner cases described, I >found a way around the restriction for the purpose I had >(http://mini.net/tcl/11575). > >For future reference: I needed access to the subsystem private data >in order to intimately interfere with their behavior. I managed to >get around it using dlsym to interfere using their private functional >interface instead > >Elf trumps 'static' declaration, and although it's a very icky way to >do it, I justify that by thinking of it as a 'keyhole surgical' >intervention. It's probably more futureproof this way, too. (user: dkf size: 1951)
TIP: 134 Title: Subsystem Per-Thread Data Interfaces Version: $Revision: 1.4 $ Author: Colin McCormack <[email protected]> State: Withdrawn Type: Project Vote: Pending Created: 12-May-2003 Post-History: Tcl-Version: 8.5 ~ Abstract Tcl core subsystems per-thread data is good, because it modularises the core. None of the structures or access keys are exported, which is bad, because it makes modification to these subsystems difficult in a CVS world. ~ Rationale If one wishes to track the CVS while writing modifications to core subsystems one needs to minimally impact the existing source files while adding or changing subsystem functionality. Since most subsystem global state is kept in Thread Specific Data, and access to this state is necessary for subsystem modifications, providing an interface would ease coding at the core subsystem level. Modular encapsulation would be preserved by conditionally compiling API elements useful only to subsystem development and not intended for extension development. ~ Justification The degree of modularity of the core would remain unchanged, access to subsystem TSD would presumably only be used for subsystem development, but would enable that development to proceed more easily - one could extend subsystems as easily as one currently writes extensions. I think the degree of potential abuse is likely to be low. ~ Outline of Proposal Each Thread Specific Data structure should be named uniquely for each subsystem. Each subsystem should have its own .h header file Each subsystem should export a function like ''tclTSD<subsystem>'' returning pointer to its TSD. This API should be conditionally compiled, so that it's clear that it's not available to normal extensions. ~ Implementation The implementation of this TIP is trivial. ~ Copyright This document has been placed in the public domain.