diff options
author | marcel <marcel@FreeBSD.org> | 2006-08-30 03:31:32 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2006-08-30 03:31:32 +0000 |
commit | 4736b1fdce117521ab47cd625661b1c7a3711d0d (patch) | |
tree | b71ca619a44450cd40b5b476a058b5a4af720aba /lib/libthr | |
parent | 0b6bc8a47b82a98048cd7a2da3caffef19eff7aa (diff) | |
download | FreeBSD-src-4736b1fdce117521ab47cd625661b1c7a3711d0d.zip FreeBSD-src-4736b1fdce117521ab47cd625661b1c7a3711d0d.tar.gz |
o Set TP using inline assembly to avoid dead code elimination.
o Eliminate _tcb.
Diffstat (limited to 'lib/libthr')
-rw-r--r-- | lib/libthr/arch/ia64/include/pthread_md.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/libthr/arch/ia64/include/pthread_md.h b/lib/libthr/arch/ia64/include/pthread_md.h index aee5dd2..d64800b 100644 --- a/lib/libthr/arch/ia64/include/pthread_md.h +++ b/lib/libthr/arch/ia64/include/pthread_md.h @@ -44,8 +44,6 @@ struct tcb { register struct tcb *_tp __asm("%r13"); -#define _tcb _tp - /* * The tcb constructors. */ @@ -56,13 +54,13 @@ void _tcb_dtor(struct tcb *); static __inline void _tcb_set(struct tcb *tcb) { - _tp = tcb; + __asm __volatile("mov r13 = %0;;" :: "r"(tcb)); } static __inline struct tcb * _tcb_get(void) { - return (_tcb); + return (_tp); } extern struct pthread *_thr_initial; @@ -71,7 +69,7 @@ static __inline struct pthread * _get_curthread(void) { if (_thr_initial) - return (_tcb->tcb_thread); + return (_tp->tcb_thread); return (NULL); } |