This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc 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]

GNU C Library master sources branch hjl/pthread created. glibc-2.16-ports-merge-299-gc34a378


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, hjl/pthread has been created
        at  c34a37808e23d70bfa12c99797df6995a3ead495 (commit)

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c34a37808e23d70bfa12c99797df6995a3ead495

commit c34a37808e23d70bfa12c99797df6995a3ead495
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Sep 6 14:12:40 2012 -0700

    Provide secondary pthread definitios for GCC

diff --git a/ChangeLog.pthread b/ChangeLog.pthread
index 771b153..5cb785b 100644
--- a/ChangeLog.pthread
+++ b/ChangeLog.pthread
@@ -6,3 +6,29 @@
 	* configure: Regenerated. 
 	* csu/libc-tls.c (__pthread_initialize_minimal): Mark it
 	secondary if supported.
+	(pthread_attr_init): Defined as secondary if supported.
+	(pthread_attr_setdetachstate): Likewise.
+	(pthread_cond_broadcast): Likewise.
+	(pthread_cond_destroy: Likewise.
+	(pthread_cond_init): Likewise.
+	(pthread_cond_signal): Likewise.
+	(pthread_cond_wait): Likewise.
+	(pthread_create): Likewise.
+	(pthread_detach): Likewise.
+	(pthread_exit): Likewise.
+	(pthread_getschedparam): Likewise.
+	(pthread_getspecific): Likewise.
+	(pthread_join): Likewise.
+	(pthread_key_create): Likewise.
+	(pthread_key_delete): Likewise.
+	(pthread_mutex_destroy): Likewise.
+	(pthread_mutex_init): Likewise.
+	(pthread_mutex_lock): Likewise.
+	(pthread_mutex_trylock): Likewise.
+	(pthread_mutex_unlock): Likewise.
+	(pthread_once): Likewise.
+	(pthread_self): Likewise.
+	(pthread_setschedparam): Likewise.
+	(pthread_setspecific): Likewise.
+	(pthread_sigmask): Likewise.
+	(__pthread_key_create): Likewise.
diff --git a/csu/libc-tls.c b/csu/libc-tls.c
index fc7c722..eb53f5c 100644
--- a/csu/libc-tls.c
+++ b/csu/libc-tls.c
@@ -16,6 +16,33 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#define pthread_attr_init pthread_attr_init_redirect
+#define pthread_attr_setdetachstate pthread_attr_setdetachstate_redirect
+#define pthread_cond_broadcast pthread_cond_broadcast_redirect
+#define pthread_cond_destroy pthread_cond_destroy_redirect
+#define pthread_cond_init pthread_cond_init_redirect
+#define pthread_cond_signal pthread_cond_signal_redirect
+#define pthread_cond_wait pthread_cond_wait_redirect
+#define pthread_create pthread_create_redirect
+#define pthread_detach pthread_detach_redirect
+#define pthread_exit pthread_exit_redirect
+#define pthread_getschedparam pthread_getschedparam_redirect
+#define pthread_getspecific pthread_getspecific_redirect
+#define pthread_join pthread_join_redirect
+#define pthread_key_create pthread_key_create_redirect
+#define pthread_key_delete pthread_key_delete_redirect
+#define pthread_mutex_destroy pthread_mutex_destroy_redirect
+#define pthread_mutex_init pthread_mutex_init_redirect
+#define pthread_mutex_lock pthread_mutex_lock_redirect
+#define pthread_mutex_trylock pthread_mutex_trylock_redirect
+#define pthread_mutex_unlock pthread_mutex_unlock_redirect
+#define pthread_once pthread_once_redirect
+#define pthread_self pthread_self_redirect
+#define pthread_setschedparam pthread_setschedparam_redirect
+#define pthread_setspecific pthread_setspecific_redirect
+#define pthread_sigmask pthread_sigmask_redirect
+#define __pthread_key_create __pthread_key_create_redirect
+
 #include <errno.h>
 #include <ldsodefs.h>
 #include <tls.h>
@@ -23,6 +50,32 @@
 #include <stdio.h>
 #include <sys/param.h>
 
+#undef pthread_attr_init
+#undef pthread_attr_setdetachstate
+#undef pthread_cond_broadcast
+#undef pthread_cond_destroy
+#undef pthread_cond_init
+#undef pthread_cond_signal
+#undef pthread_cond_wait
+#undef pthread_create
+#undef pthread_detach
+#undef pthread_exit
+#undef pthread_getschedparam
+#undef pthread_getspecific
+#undef pthread_join
+#undef pthread_key_create
+#undef pthread_key_delete
+#undef pthread_mutex_destroy
+#undef pthread_mutex_init
+#undef pthread_mutex_lock
+#undef pthread_mutex_trylock
+#undef pthread_mutex_unlock
+#undef pthread_once
+#undef pthread_self
+#undef pthread_setschedparam
+#undef pthread_setspecific
+#undef pthread_sigmask
+#undef __pthread_key_create
 
 #ifdef SHARED
  #error makefile bug, this file is for static only
@@ -250,4 +303,63 @@ __pthread_initialize_minimal (void)
 
 #ifdef HAVE_ASM_SECONDARY_DIRECTIVE
 asm (".secondary __pthread_initialize_minimal");
+
+void
+pthread_attr_init (void)
+{
+}
+
+typeof (pthread_attr_init) pthread_attr_setdetachstate __attribute ((alias ("pthread_attr_init")));
+typeof (pthread_attr_init) pthread_cond_broadcast __attribute ((alias ("pthread_attr_init")));
+typeof (pthread_attr_init) pthread_cond_destroy __attribute ((alias ("pthread_attr_init")));
+typeof (pthread_attr_init) pthread_cond_init __attribute ((alias ("pthread_attr_init")));
+typeof (pthread_attr_init) pthread_cond_signal __attribute ((alias ("pthread_attr_init")));
+typeof (pthread_attr_init) pthread_cond_wait __attribute ((alias ("pthread_attr_init")));
+typeof (pthread_attr_init) pthread_create __attribute ((alias ("pthread_attr_init")));
+typeof (pthread_attr_init) pthread_detach __attribute ((alias ("pthread_attr_init")));
+typeof (pthread_attr_init) pthread_exit __attribute ((alias ("pthread_attr_init")));
+typeof (pthread_attr_init) pthread_getschedparam __attribute ((alias ("pthread_attr_init")));
+typeof (pthread_attr_init) pthread_getspecific __attribute ((alias ("pthread_attr_init")));
+typeof (pthread_attr_init) pthread_join __attribute ((alias ("pthread_attr_init")));
+typeof (pthread_attr_init) pthread_key_create __attribute ((alias ("pthread_attr_init")));
+typeof (pthread_attr_init) pthread_key_delete __attribute ((alias ("pthread_attr_init")));
+typeof (pthread_attr_init) pthread_mutex_destroy __attribute ((alias ("pthread_attr_init")));
+typeof (pthread_attr_init) pthread_mutex_init __attribute ((alias ("pthread_attr_init")));
+typeof (pthread_attr_init) pthread_mutex_lock __attribute ((alias ("pthread_attr_init")));
+typeof (pthread_attr_init) pthread_mutex_trylock __attribute ((alias ("pthread_attr_init")));
+typeof (pthread_attr_init) pthread_mutex_unlock __attribute ((alias ("pthread_attr_init")));
+typeof (pthread_attr_init) pthread_once __attribute ((alias ("pthread_attr_init")));
+typeof (pthread_attr_init) pthread_self __attribute ((alias ("pthread_attr_init")));
+typeof (pthread_attr_init) pthread_setschedparam __attribute ((alias ("pthread_attr_init")));
+typeof (pthread_attr_init) pthread_setspecific __attribute ((alias ("pthread_attr_init")));
+typeof (pthread_attr_init) pthread_sigmask __attribute ((alias ("pthread_attr_init")));
+typeof (pthread_attr_init) __pthread_key_create __attribute ((alias ("pthread_attr_init")));
+
+asm (".secondary pthread_attr_init");
+asm (".secondary pthread_attr_setdetachstate");
+asm (".secondary pthread_cond_broadcast");
+asm (".secondary pthread_cond_destroy");
+asm (".secondary pthread_cond_init");
+asm (".secondary pthread_cond_signal");
+asm (".secondary pthread_cond_wait");
+asm (".secondary pthread_create");
+asm (".secondary pthread_detach");
+asm (".secondary pthread_exit");
+asm (".secondary pthread_getschedparam");
+asm (".secondary pthread_getspecific");
+asm (".secondary pthread_join");
+asm (".secondary pthread_key_create");
+asm (".secondary pthread_key_delete");
+asm (".secondary pthread_mutex_destroy");
+asm (".secondary pthread_mutex_init");
+asm (".secondary pthread_mutex_lock");
+asm (".secondary pthread_mutex_trylock");
+asm (".secondary pthread_mutex_unlock");
+asm (".secondary pthread_once");
+asm (".secondary pthread_self");
+asm (".secondary pthread_setschedparam");
+asm (".secondary pthread_setspecific");
+asm (".secondary pthread_sigmask");
+asm (".secondary __pthread_key_create");
+
 #endif

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a52a08f1b9215a4c6d9090db580fcb1b3b46f637

commit a52a08f1b9215a4c6d9090db580fcb1b3b46f637
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Sep 6 06:56:38 2012 -0700

    Mark __pthread_initialize_minimal secondary if supported

diff --git a/ChangeLog.pthread b/ChangeLog.pthread
index 67ad28f..771b153 100644
--- a/ChangeLog.pthread
+++ b/ChangeLog.pthread
@@ -4,3 +4,5 @@
 	* configure.in: Define HAVE_ASM_SECONDARY_DIRECTIVE if the
 	.secondary assembly directive works.
 	* configure: Regenerated. 
+	* csu/libc-tls.c (__pthread_initialize_minimal): Mark it
+	secondary if supported.
diff --git a/csu/libc-tls.c b/csu/libc-tls.c
index b00a5cc..fc7c722 100644
--- a/csu/libc-tls.c
+++ b/csu/libc-tls.c
@@ -247,3 +247,7 @@ __pthread_initialize_minimal (void)
 {
   __libc_setup_tls (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN);
 }
+
+#ifdef HAVE_ASM_SECONDARY_DIRECTIVE
+asm (".secondary __pthread_initialize_minimal");
+#endif

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1361a554fe93bc9708f45e778bd2d56c952cde18

commit 1361a554fe93bc9708f45e778bd2d56c952cde18
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Sep 6 06:45:28 2012 -0700

    Check if .secondary directive works

diff --git a/ChangeLog.pthread b/ChangeLog.pthread
new file mode 100644
index 0000000..67ad28f
--- /dev/null
+++ b/ChangeLog.pthread
@@ -0,0 +1,6 @@
+2012-09-06  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* config.h.in: Add HAVE_ASM_SECONDARY_DIRECTIVE.
+	* configure.in: Define HAVE_ASM_SECONDARY_DIRECTIVE if the
+	.secondary assembly directive works.
+	* configure: Regenerated. 
diff --git a/config.h.in b/config.h.in
index 10a9925..855dc39 100644
--- a/config.h.in
+++ b/config.h.in
@@ -24,6 +24,10 @@
 /* Define if weak symbols are available via the `.weakext' directive.  */
 #undef	HAVE_ASM_WEAKEXT_DIRECTIVE
 
+/* Define if secondary symbols are available via the `.secondary'
+   directive.  */
+#undef	HAVE_ASM_SECONDARY_DIRECTIVE
+
 /* Define if CFI directives are available.  */
 #undef	HAVE_ASM_CFI_DIRECTIVES
 
diff --git a/configure b/configure
index d159ce0..32dc4db 100755
--- a/configure
+++ b/configure
@@ -6725,8 +6725,10 @@ if { ac_try='${CC-cc} $ASFLAGS -c conftest.s 1>&5'
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then
   libc_cv_asm_weak_directive=yes
+  libc_cv_asm_weak=.weak
 else
   libc_cv_asm_weak_directive=no
+  libc_cv_asm_weak=
 fi
 rm -f conftest*
 fi
@@ -6755,6 +6757,7 @@ EOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then
     libc_cv_asm_weakext_directive=yes
+  libc_cv_asm_weak=.weakext
   else
     libc_cv_asm_weakext_directive=no
   fi
@@ -6773,6 +6776,37 @@ elif test $libc_cv_asm_weakext_directive = yes; then
 
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for .secondary assembler directive" >&5
+$as_echo_n "checking for .secondary assembler directive... " >&6; }
+if ${libc_cv_asm_secondary_directive+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat > conftest.s <<EOF
+${libc_cv_dot_text}
+_sym:
+.secondary _sym
+EOF
+test -n "$libc_cv_asm_weak" && cat >> conftest.s <<EOF
+$libc_cv_asm_weak _sym
+EOF
+if ${CC-cc} -c $ASFLAGS -o conftest.o conftest.s 1>&5 2>&5; then
+  if $READELF -s conftest.o | fgrep SECOND > /dev/null; then
+    libc_cv_asm_secondary_directive=yes
+  else
+    libc_cv_asm_secondary_directive=no
+  fi
+else
+  libc_cv_asm_secondary_directive=no
+fi
+rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_secondary_directive" >&5
+$as_echo "$libc_cv_asm_secondary_directive" >&6; }
+if test $libc_cv_asm_secondary_directive = yes; then
+  $as_echo "#define HAVE_ASM_SECONDARY_DIRECTIVE 1" >>confdefs.h
+
+fi
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CFI directives are supported" >&5
 $as_echo_n "checking whether CFI directives are supported... " >&6; }
 if ${libc_cv_asm_cfi_directives+:} false; then :
diff --git a/configure.in b/configure.in
index a174646..c50ca27 100644
--- a/configure.in
+++ b/configure.in
@@ -1757,8 +1757,10 @@ foo:
 EOF
 if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
   libc_cv_asm_weak_directive=yes
+  libc_cv_asm_weak=.weak
 else
   libc_cv_asm_weak_directive=no
+  libc_cv_asm_weak=
 fi
 rm -f conftest*])
 
@@ -1777,6 +1779,7 @@ baz:
 EOF
   if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
     libc_cv_asm_weakext_directive=yes
+  libc_cv_asm_weak=.weakext
   else
     libc_cv_asm_weakext_directive=no
   fi
@@ -1790,6 +1793,30 @@ elif test $libc_cv_asm_weakext_directive = yes; then
   AC_DEFINE(HAVE_ASM_WEAKEXT_DIRECTIVE)
 fi
 
+AC_CACHE_CHECK(for .secondary assembler directive,
+	       libc_cv_asm_secondary_directive, [dnl
+cat > conftest.s <<EOF
+${libc_cv_dot_text}
+_sym:
+.secondary _sym
+EOF
+test -n "$libc_cv_asm_weak" && cat >> conftest.s <<EOF
+$libc_cv_asm_weak _sym
+EOF
+if ${CC-cc} -c $ASFLAGS -o conftest.o conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
+  if $READELF -s conftest.o | fgrep SECOND > /dev/null; then
+    libc_cv_asm_secondary_directive=yes
+  else
+    libc_cv_asm_secondary_directive=no
+  fi
+else
+  libc_cv_asm_secondary_directive=no
+fi
+rm -f conftest*])
+if test $libc_cv_asm_secondary_directive = yes; then
+  AC_DEFINE(HAVE_ASM_SECONDARY_DIRECTIVE)
+fi
+
 AC_CACHE_CHECK(whether CFI directives are supported, libc_cv_asm_cfi_directives, [dnl
 case $machine in
   sparc/sparc64*) cfi_offset=2047;;

-----------------------------------------------------------------------


hooks/post-receive
-- 
GNU C Library master sources


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