ham@polya.Stanford.EDU (Peter R. Ham) (01/24/89)
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. Is anyone else working on similar light weight process issues with gcc? After this project, our operating system, the V system, will try and tackle shared libraries? Anyone working on the compiler issues relating to this? Does gcc fit into the shared library architecture of the new version of SunOS? Anyone plan to extend gcc to also produce position independent code? I would appreciate any comments. I would like to cooperate with others and I don't want to duplicate any work. Peter -- Peter Ham PO Box 3430 (415) 321-5746 MS Computer Science Student Stanford, CA ham@polya.stanford.edu Stanford University 94309
scs@itivax.iti.org (Steve C. Simmons) (01/24/89)
In article <HAM.89Jan23194625@polya.Stanford.EDU> 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 . . . While this sounds eminently useful for your group, I'd rather not see it incorporated into the general gcc compiler until such a time as l/w processes become more generally available. Not that my opinion carries any weight . . . :-) > will try and tackle shared libraries? Anyone working on the compiler issues >relating to this? Does gcc fit into the shared library architecture of >the new version of SunOS? Gcc links just fine with shared libraries on the unix-pc. No hacks required -- everything is done by ld, not the compiler. Haven't tried it under 4.0SunOS. -- Steve Simmons scs@vax3.iti.org Industrial Technology Institute Ann Arbor, MI. "Velveeta -- the Spam of Cheeses!" -- Uncle Bonsai
brooks@vette.llnl.gov (Eugene Brooks) (01/25/89)
In article <HAM.89Jan23194625@polya.Stanford.EDU> 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