From mboxrd@z Thu Jan 1 00:00:00 1970 From: "J.A. Magallon" Subject: per-thread global variables Date: Fri, 12 Jul 2002 18:15:27 +0200 Sender: linux-smp-owner@vger.kernel.org Message-ID: <20020712161527.GA2348@werewolf.able.es> Mime-Version: 1.0 Content-Transfer-Encoding: 7BIT Return-path: Content-Disposition: inline List-Id: Content-Type: text/plain; charset="us-ascii" To: Lista Linux-SMP Hi all. I am looking for a method to have a global variable that has a unique personality fot each thread. I don't want to use pthreads, but I would like to emulate [get,set]specific. I just want to use clone() directly. I have read something about a __thread variable modifier, or something about an __attribute(( )) in gcc. Other solutions imply a search based on pid, but I would like to find some more direct method. Something like using the PRDA in IRIX. Anybody has any pointer/info on this ? TIA -- J.A. Magallon \ Software is like sex: It's better when it's free mailto:jamagallon@able.es \ -- Linus Torvalds, FSF T-shirt Linux werewolf 2.4.19-rc1-jam3, Mandrake Linux 8.3 (Cooker) for i586 gcc (GCC) 3.1.1 (Mandrake Linux 8.3 3.1.1-0.7mdk)