PERFORCE change 71960 for review
David Xu
davidxu at FreeBSD.org
Sun Feb 27 05:11:36 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=71960
Change 71960 by davidxu at 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
}
More information about the p4-projects
mailing list