Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 20 Sep 2002 07:06:56 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 20 Sep 2002 07:06:56 -0400 Received: from mx1.elte.hu ([157.181.1.137]:65201 "HELO mx1.elte.hu") by vger.kernel.org with SMTP id ; Fri, 20 Sep 2002 07:06:55 -0400 Date: Fri, 20 Sep 2002 13:19:35 +0200 (CEST) From: Ingo Molnar Reply-To: Ingo Molnar To: Luca Barbieri Cc: Ulrich Drepper , Linux-Kernel ML , NPT library mailing list Subject: Re: [ANNOUNCE] Native POSIX Thread Library 0.1 In-Reply-To: <1032518123.2024.6.camel@ldb> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 824 Lines: 27 On 20 Sep 2002, Luca Barbieri wrote: > Great, but how about using code similar to the following rather than > hand-coded asm operations? > > extern struct pthread __pt_current_struct asm("%gs:0"); > #define __pt_current (&__pt_current_struct) > > #define THREAD_GETMEM(descr, member) (__pt_current->member) > #define THREAD_SETMEM(descr, member, value) ((__pt_current->member) = > value) > #define THREAD_MASKMEM(descr, member, mask) ((__pt_current->member) &= > mask) > ... it's a good idea i think. Ulrich has an obsession with writing code in assembly though :-) Ingo - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/