This is the mail archive of the java-discuss@sources.redhat.com mailing list for the Java project.


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

Re: Segment Register thread descriptor (was Re: Jv_AllocBytesChecked)


Bryce McKinlay wrote:

> It looks like we could just pinch the THREAD_SELF macro
> from linuxthreads/sysdeps/i386/useldt.h, but it would only work in the presence
> of a 2.4 kernel *and* a glibc compiled with kernel 2.4 support enabled. It would
> also expose libjava to possible future changes in the linuxthreads internals.

Actually, it probably wouldn't be so bad. Thats because we don't need the real
pthread ID but just a pointer that is unique for each thread, so the actual contents
of the struct that linuxthreads keeps in the segment register is unimportant.

Could we just grab the entire linuxthreads sysdeps directory and stick it in libjava
to get its compare_and_swap definitions and THREAD_SELF macros? Then we won't even
need to worry about writing special code for different architectures - at least for
linux platforms.

regards

  [ bryce ]



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