From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,92f31bafc1256763 X-Google-Attributes: gidfee84,public X-Google-Thread: f678f,fb7d30cdbe7debec X-Google-Attributes: gidf678f,public X-Google-ArrivalTime: 1993-07-16 05:19:41 PST Xref: gmd.de comp.unix.osf.osf1:633 comp.unix.osf.misc:340 Path: gmd.de!xlink.net!howland.reston.ans.net!usc!cs.utexas.edu!uunet!pipex!uknet!zaphod.axion.bt.co.uk!nwinton From: nwinton@axion.bt.co.uk (Neil Winton) Newsgroups: comp.unix.osf.osf1,comp.unix.osf.misc Subject: Re: DCE/Posix threads Date: 16 Jul 1993 12:17:52 GMT Organization: BT Laboratories Distribution: na Message-ID: <22669g$4oq@zaphod.axion.bt.co.uk> References: NNTP-Posting-Host: newton.axion.bt.co.uk In article , grunwald@frob.cs.colorado.edu (Dirk Grunwald) writes: |> |> |> I need to know how DCE/Posix threads access per-pthread information. |> On our KSR-1, there is a compiler directive '__private' that lets me |> indicate a copy of that variable should be allocated for each pthread |> that is created. There is no such directive on our DEC AXP 3000/400. |> |> In the DCE environment, I'm beginning to suspect that you must depend |> on the intial argument value passed into the thread. Is this the case? |> Any examples would be helpful. Sorry I don't have an example to hand, but you should look at the routines pthread_keycreate(), pthread_setspecific and pthread_getspecific(). These routines allow "per thread global" information to be stored and retrieved. Basically you create a key (which is shared by all threads) and then associate specific data with it on a per-thread basis. So you effectively have a key which "means the same thing" to each thread, but which has a different value for each thread. This seems pretty much the semantics of __private you describe above. |> Thanks, |> Dirk Grunwald Asst. Prof, Univ. of Colorado at Boulder I haven't used this, so it is just my understanding of the documentation, but I hope it helps. Neil * Neil Winton G306a, SSTF Building This sentence * * N.Winton@axion.bt.co.uk BT Laboratories has two missing, * * Tel +44 473 646079 Martlesham Heath but you can still * * Fax +44 473 643019 IPSWICH IP5 7RE, UK sense of it. *