This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: New pthreads library


On Mon, Aug 30, 1999 at 05:15:49PM -0400, Roland McGrath wrote:
> I don't suppose it would be worth adding __attribute__((segment ("%gs")))
> on extern decls.  

Without additional work, that wouldn't be able to accomplish
what you want.  What you _really_ want is something like

  int * __attribute__((seggs)) ptr;

so that %gs is used whenever ptr is dereferenced.  Then you'd do

  struct stuff {
  	int x, y, x;
  };

  #define thread_ptr	((struct stuff * __attribute__((seggs))) 0)

  thread_ptr->y;

The DSP folks would love for us to be able to represent something
like this, since differing address spaces for them have different
scheduling characteristics.  (E.g.  you may schedule two loads in
the same cycle, but only if one is from X memory and the other from
Y memory.)


r~

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]