Overview
| Artifact ID: | 881d3fd163f795599683183c33fb83ea4bb053f6 |
|---|---|
| Ticket: | 731356ffffffffffffffffffffffffffffffffff
Win32 non-TLS thread storage patch... |
| User & Date: | kennykb on 2003-05-11 00:25:37 |
Changes
- icomment:
Logged In: YES user_id=99768 This is starting to look good! Just a few comments before it gets committed: (1) I'd be a bit more comfortable if STORAGE_CACHE_SLOTS were a prime number. Consider that on at least one version of Windows, the thread ID is always a multiple of four; this means that the position in the cache will also be a multiple of four, giving us only 25 effective slots instead of 100. Could we perhaps make it 97 instead? Another point is that we might want to consider making it a variable instead of a constant. The advantage to this is that we could compile tcltest with a very, very small value (2 perhaps) and thus make sure of test coverage in the cache miss logic. (2) Several new Tcl* functions have been added. It's generally considered good practice to put them in tclInt.decls -- but opinions vary about the use of the internal stubs table, so I'll be willing to be convinced otherwise. (3) Several functions in the new code lack prologue comments. It would be nice if these could get written before committing. (4) The management scheme that we've arrived at for thread specific data is actually platform neutral. Given that we've already encountered one platform with an awkward hard limit on thread specific data blocks, I'd not be willing to lay long odds that there is no other. I wonder if we should move the platform-neutral TSD management logic to generic/tclThread.c instead of calling it Windows code. (5) What's the difference between TCL_NO_TLS and TCL_THREAD_ALLOC_NO_TLS? Do we need both flags? (Actually, I wonder, given how badly Windows does this, whether we need either, or whether we just want to use our own system exclusively.) Nice job - I'm tempted to say that we should just use it for ALL our TSD management, irrespective of platform. - login: "kennykb"
- mimetype: "text/plain"
- username: "kennykb"