Path: utzoo!utgpu!watmath!uunet!lll-winken!vette!brooks From: brooks@vette.llnl.gov (Eugene Brooks) Newsgroups: gnu.gcc.bug Subject: Re: Future of gcc in terms of threads and shared libraries Message-ID: <17259@lll-winken.LLNL.GOV> Date: 24 Jan 89 17:33:11 GMT References: Sender: usenet@lll-winken.LLNL.GOV Reply-To: brooks@maddog.llnl.gov.UUCP (Eugene Brooks) Distribution: gnu Organization: Lawrence Livermore National Laboratory Lines: 35 In article ham@polya.Stanford.EDU (Peter R. Ham) writes: > > At the Distributed Systems Group, we are working to extend >gcc to accept a new keyword "shared" to distinguish global data >that is shared among light weight process in a task rather than private >to a single thread. I hear that Sequent has a similar feature in one >of their proprietary compilers. > > I would like to solicit some comments and ideas about what the >right way to add this to gcc is. Right now, I have added the new keyword >and taught gcc how to generate different types of global reference for >the memory architecture we are using here. Now, I'm modifying gas to >reflect a new a.out format for this new feature. Next, I will be tackling the >linker. I would also like my changes to be of sufficient quality to migrate >their way back into the released gcc proper. > The keywords "shared" and "private" are implemented at storage class modifiers of sorts in Sequent's PCC based compiler. They may be applied to extern or static declarations. In addition to the keywords you can apply a flag '-Y' to the compiler, similarly to the -fshared-data flag for GCC now, which defaults data to shared status. This is the reason for the existence of the keyword "private." With the keywords as implemented by Sequent, you can NOT for instance declare a "pointer to shared data" which would be useful for an enhanced version of lint. The notion of type modfiers instead of storage class modifiers would also be useful on machines which might have seperate address spaces for shared and private data, much like some machines have seperate address spaces for text and data. Such checking of pointers is very useful to anyone who has extensive experience with parallel programming. Defining the keywords "shared" and "private" to be type modifiers used much like "const" and "volitile" would be very useful in this regard. Eugene Brooks brooks@maddog.llnl.gov