This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Solaris & pthread mutex initializers


The current scheme isn't exactly working and the right way to do
it seems hard.  (leastwise, until Sun itself provides for a
"upad64_t" initializer and uses that in the initializer...).
The data structures being initialized are actually defined
in /usr/include/sys/types.h and they seem to change every time
that file wiggles.  Therefore, determining which flavor of initializer
to use really needs to depend upon the version of that  file.
In poking around, I've discovered six flavors in the wild,
and I guess there to be more:

    case 51: pi = &types_51; break; /* sol  6 */
    case 63: pi = &types_63; break; /* sol  7 */
    case 66: pi = &types_66; break; /* sol  8 */
    case 69: pi = &types_69; break; /* sol  8 */
    case 74: pi = &types_74; break; /* sol  9 */
    case 84: pi = &types_84; break; /* sol 10 */

and they are all different.  Notice that there are
*two* for sol 8.  Attached is a patch, including an
example of what it did to my /usr/include/pthread.h
header.  I guess the "right thing" is to try to get
the rest of the types.h versions filled in.....(NOTE:
I am not using the version of pthread.h, since it is
conceivable that the file could be left unchanged
even though the structures in types.h get changed.)

Cheers -Bruce

Attachment: fi.diff
Description: Binary data


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