Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Feb 2005 05:11:35 GMT
From:      David Xu <davidxu@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 71960 for review
Message-ID:  <200502270511.j1R5BZSr063378@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=71960

Change 71960 by davidxu@davidxu_tiger on 2005/02/27 05:11:29

	Now, libthread is the first library to support __thread on IA64!

Affected files ...

.. //depot/projects/davidxu_thread/src/lib/libthread/arch/ia64/ia64/pthread_md.c#5 edit

Differences ...

==== //depot/projects/davidxu_thread/src/lib/libthread/arch/ia64/ia64/pthread_md.c#5 (text+ko) ====

@@ -30,6 +30,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <sys/types.h>
+
 #include "rtld_tls.h"
 #include "pthread_md.h"
 
@@ -46,27 +47,14 @@
 		oldtls = _tp;
 	else
 		oldtls = NULL;
-
-#if 1
-	if ((tcb = malloc(sizeof(struct tcb))) != NULL) {
-		memset(tcb, 0, sizeof(struct tcb));
-		tcb->tcb_thread = thread;
-	}
-#else
 	tcb = _rtld_allocate_tls(oldtls, sizeof(struct tcb), 16);
-	if (tcb) {
+	if (tcb)
 		tcb->tcb_thread = thread;
-	}
-#endif
 	return (tcb);
 }
 
 void
 _tcb_dtor(struct tcb *tcb)
 {
-#if 1
-	free(tcb);
-#else
 	_rtld_free_tls(tcb, sizeof(tcb), 16);
-#endif
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200502270511.j1R5BZSr063378>