Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!sun-barr!decwrl!ucbvax!hplabs!otter!hjb From: hjb@otter.hpl.hp.com (Harry Barman) Newsgroups: comp.os.os2 Subject: Re: Per thread global data Message-ID: <14570004@otter.hpl.hp.com> Date: 19 Dec 89 16:21:12 GMT References: <14570003@otter.hpl.hp.com> Organization: Hewlett-Packard Laboratories, Bristol, UK. Lines: 19 I had some people from microsoft contact me about this (thanks Chris and Alistair).... It looks like the best way to do per thread global data is to allocate a stack segment for each thread, and leave the global data at the bottom of the area. [the stack grows down from the top, the global data is accessed from SS:0] There are a couple of places which could use this trick, like the multi-thread C library (currently restricted to 32 threads!). What concerns me is that we don't all trip over each other, I'd really like to see in the future is some general way for threads to allocate thread-global data. Thanks for the help, Cheers, Harry