aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2012-05-11 14:42:46 -0400
committerChris Metcalf <cmetcalf@tilera.com>2012-05-14 15:46:08 -0400
commit87df4a4b09abdb1b1af41c9c398b86ecdedcb635 (patch)
tree250113f3d13cac107e1d30403005d375e25ce58c
parent538c451b2bbbcb258640b0e0ea0c74f9da005beb (diff)
downloadglibc-87df4a4b09abdb1b1af41c9c398b86ecdedcb635.tar.xz
glibc-87df4a4b09abdb1b1af41c9c398b86ecdedcb635.zip
tile: update pthread_attr_t and struct siginfo names
This adds a tag to the pthread_attr_t underlying type so we can forward-declare it, and removes the siginfo_t type, to match changes in the main tree.
-rw-r--r--ChangeLog.tile8
-rw-r--r--sysdeps/unix/sysv/linux/tile/bits/siginfo.h12
-rw-r--r--sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h11
3 files changed, 24 insertions, 7 deletions
diff --git a/ChangeLog.tile b/ChangeLog.tile
index a8b24588da..4846802658 100644
--- a/ChangeLog.tile
+++ b/ChangeLog.tile
@@ -1,5 +1,13 @@
2012-05-12 Chris Metcalf <cmetcalf@tilera.com>
+ * sysdeps/unix/sysv/linux/tile/bits/siginfo.h: Don't name
+ siginfo_t struct. Add forward declaration of pthread_attr_t and
+ use it in sigevent.
+ * sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h: Name
+ pthread_attr_t union.
+
+2012-05-12 Chris Metcalf <cmetcalf@tilera.com>
+
* sysdeps/tile/crti.S: New file, based on compiler output
for sysdeps/generic/initfini.c.
* sysdeps/tile/crtn.S: Likewise.
diff --git a/sysdeps/unix/sysv/linux/tile/bits/siginfo.h b/sysdeps/unix/sysv/linux/tile/bits/siginfo.h
index aeecd1960f..44ffcc04d1 100644
--- a/sysdeps/unix/sysv/linux/tile/bits/siginfo.h
+++ b/sysdeps/unix/sysv/linux/tile/bits/siginfo.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
@@ -47,7 +47,7 @@ typedef union sigval
# define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3)
# endif
-typedef struct siginfo
+typedef struct
{
int si_signo; /* Signal number. */
int si_errno; /* If non-zero, an errno value associated with
@@ -275,6 +275,12 @@ enum
# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
# endif
+/* Forward declaration. */
+# ifndef __have_pthread_attr_t
+typedef union pthread_attr_t pthread_attr_t;
+# define __have_pthread_attr_t 1
+# endif
+
typedef struct sigevent
{
sigval_t sigev_value;
@@ -292,7 +298,7 @@ typedef struct sigevent
struct
{
void (*_function) (sigval_t); /* Function to start. */
- void *_attribute; /* Really pthread_attr_t. */
+ pthread_attr_t *_attribute; /* Thread attributes. */
} _sigev_thread;
} _sigev_un;
} sigevent_t;
diff --git a/sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h
index d840ce5837..ac51e3b93c 100644
--- a/sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Based on work contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
@@ -50,12 +50,15 @@
typedef unsigned long int pthread_t;
-typedef union
+union pthread_attr_t
{
char __size[__SIZEOF_PTHREAD_ATTR_T];
long int __align;
-} pthread_attr_t;
-
+};
+#ifndef __have_pthread_attr_t
+typedef union pthread_attr_t pthread_attr_t;
+# define __have_pthread_attr_t 1
+#endif
#if __WORDSIZE == 64
typedef struct __pthread_internal_list