From: Andreas Jaeger <aj@suse.de>
To: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: dtv_t in linuxthreads and nptl
Date: Sun, 09 Jan 2005 09:49:00 -0000 [thread overview]
Message-ID: <m3acrjgceg.fsf@gromit.moeb> (raw)
[-- Attachment #1: Type: text/plain, Size: 8335 bytes --]
Compilation with linuxthreads fails due to:
../sysdeps/generic/libc-tls.c: In function ‘__libc_setup_tls’:
../sysdeps/generic/libc-tls.c:181: error: request for member ‘val’ in something not a structure or union
../sysdeps/generic/libc-tls.c:190: error: request for member ‘is_static’ in something not a structure or union
../sysdeps/generic/libc-tls.c:192: error: request for member ‘val’ in something not a structure or union
The problem is that the recent changes for nptl have not been made for
linuxthreads.
Ok to commit the appended patch? I'm currently testing on x86-64.
Andreas
2005-01-08 Andreas Jaeger <aj@suse.de>
* sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
also contains information whether the memory pointed to is static
TLS or not, include <stdbool.h>.
* sysdeps/i386/tls.h: Likewise.
* sysdeps/ia64/tls.h: Likewise.
* sysdeps/powerpc/tls.h: Likewise.
* sysdeps/s390/tls.h: Likewise.
* sysdeps/sh/tls.h: Likewise.
* sysdeps/sparc/tls.h: Likewise.
* sysdeps/x86_64/tls.h: Likewise.
============================================================
Index: linuxthreads/sysdeps/alpha/tls.h
--- linuxthreads/sysdeps/alpha/tls.h 30 Jan 2003 21:03:40 -0000 1.5
+++ linuxthreads/sysdeps/alpha/tls.h 9 Jan 2005 09:48:52 -0000
@@ -1,5 +1,5 @@
/* Definitions for thread-local data handling. linuxthreads/Alpha version.
- Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,7 +29,11 @@
typedef union dtv
{
size_t counter;
- void *pointer;
+ struct
+ {
+ void *val;
+ bool is_static;
+ } pointer;
} dtv_t;
============================================================
Index: linuxthreads/sysdeps/i386/tls.h
--- linuxthreads/sysdeps/i386/tls.h 19 Oct 2004 05:12:58 -0000 1.37
+++ linuxthreads/sysdeps/i386/tls.h 9 Jan 2005 09:48:52 -0000
@@ -1,5 +1,5 @@
/* Definition for thread-local data handling. linuxthreads/i386 version.
- Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,6 +24,7 @@
# include <pt-machine.h>
#ifndef __ASSEMBLER__
+# include <stdbool.h>
# include <stddef.h>
# include <stdint.h>
@@ -31,7 +32,11 @@
typedef union dtv
{
size_t counter;
- void *pointer;
+ struct
+ {
+ void *val;
+ bool is_static;
+ } pointer;
} dtv_t;
============================================================
Index: linuxthreads/sysdeps/ia64/tls.h
--- linuxthreads/sysdeps/ia64/tls.h 8 Jul 2004 21:20:57 -0000 1.9
+++ linuxthreads/sysdeps/ia64/tls.h 9 Jan 2005 09:48:52 -0000
@@ -1,5 +1,5 @@
/* Definitions for thread-local data handling. linuxthreads/IA-64 version.
- Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,12 +25,17 @@
# include <dl-sysdep.h>
# include <pt-machine.h>
# include <stddef.h>
+# include <stdbool.h>
/* Type for the dtv. */
typedef union dtv
{
size_t counter;
- void *pointer;
+ struct
+ {
+ void *val;
+ bool is_static;
+ } pointer;
} dtv_t;
#else /* __ASSEMBLER__ */
============================================================
Index: linuxthreads/sysdeps/powerpc/tls.h
--- linuxthreads/sysdeps/powerpc/tls.h 9 Apr 2004 19:09:42 -0000 1.8
+++ linuxthreads/sysdeps/powerpc/tls.h 9 Jan 2005 09:48:53 -0000
@@ -1,5 +1,5 @@
/* Definitions for thread-local data handling. linuxthreads/PPC version.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,13 +23,18 @@
#ifndef __ASSEMBLER__
# include <pt-machine.h>
+# include <stdbool.h>
# include <stddef.h>
/* Type for the dtv. */
typedef union dtv
{
size_t counter;
- void *pointer;
+ struct
+ {
+ void *val;
+ bool is_static;
+ } pointer;
} dtv_t;
#else /* __ASSEMBLER__ */
============================================================
Index: linuxthreads/sysdeps/s390/tls.h
--- linuxthreads/sysdeps/s390/tls.h 30 Jan 2003 18:34:11 -0000 1.3
+++ linuxthreads/sysdeps/s390/tls.h 9 Jan 2005 09:48:53 -0000
@@ -1,5 +1,5 @@
/* Definitions for thread-local data handling. linuxthreads/s390 version.
- Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,13 +23,18 @@
#ifndef __ASSEMBLER__
# include <pt-machine.h>
+# include <stdbool.h>
# include <stddef.h>
/* Type for the dtv. */
typedef union dtv
{
size_t counter;
- void *pointer;
+ struct
+ {
+ void *val;
+ bool is_static;
+ } pointer;
} dtv_t;
typedef struct
============================================================
Index: linuxthreads/sysdeps/sh/tls.h
--- linuxthreads/sysdeps/sh/tls.h 2 Mar 2003 11:44:20 -0000 1.9
+++ linuxthreads/sysdeps/sh/tls.h 9 Jan 2005 09:48:53 -0000
@@ -1,5 +1,5 @@
/* Definition for thread-local data handling. linuxthreads/SH version.
- Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,6 +24,7 @@
# include <pt-machine.h>
#ifndef __ASSEMBLER__
+# include <stdbool.h>
# include <stddef.h>
# include <stdint.h>
@@ -31,7 +32,11 @@
typedef union dtv
{
size_t counter;
- void *pointer;
+ struct
+ {
+ void *val;
+ bool is_static;
+ } pointer;
} dtv_t;
#else /* __ASSEMBLER__ */
============================================================
Index: linuxthreads/sysdeps/sparc/tls.h
--- linuxthreads/sysdeps/sparc/tls.h 4 Feb 2003 20:41:02 -0000 1.3
+++ linuxthreads/sysdeps/sparc/tls.h 9 Jan 2005 09:48:53 -0000
@@ -1,5 +1,5 @@
/* Definitions for thread-local data handling. linuxthreads/sparc version.
- Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,13 +23,18 @@
#ifndef __ASSEMBLER__
# include <pt-machine.h>
+# include <stdbool.h>
# include <stddef.h>
/* Type for the dtv. */
typedef union dtv
{
size_t counter;
- void *pointer;
+ struct
+ {
+ void *val;
+ bool is_static;
+ } pointer;
} dtv_t;
typedef struct
============================================================
Index: linuxthreads/sysdeps/x86_64/tls.h
--- linuxthreads/sysdeps/x86_64/tls.h 18 Apr 2004 02:32:25 -0000 1.6
+++ linuxthreads/sysdeps/x86_64/tls.h 9 Jan 2005 09:48:53 -0000
@@ -1,5 +1,5 @@
/* Definitions for thread-local data handling. linuxthreads/x86-64 version.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,7 +21,7 @@
#define _TLS_H
#ifndef __ASSEMBLER__
-
+# include <stdbool.h>
# include <pt-machine.h>
# include <stddef.h>
@@ -29,7 +29,11 @@
typedef union dtv
{
size_t counter;
- void *pointer;
+ struct
+ {
+ void *val;
+ bool is_static;
+ } pointer;
} dtv_t;
--
Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]
next reply other threads:[~2005-01-09 9:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-09 9:49 Andreas Jaeger [this message]
2005-01-09 11:53 ` Andreas Jaeger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3acrjgceg.fsf@gromit.moeb \
--to=aj@suse.de \
--cc=libc-hacker@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).