# Multithreaded Tcl - Thread Local Storage

- ## Next, various global data had to be moved to thread local storage, e.g., from tclIO.c:

void

Tcl_SetStdChannel(channel, type)

{

ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);

switch (type) {

case TCL_STDIN:

tsdPtr->stdinInitialized = 1;

tsdPtr->stdinChannel = channel;

break;

...

Previous slide | Next slide | Back to first slide | View graphic version