Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/vax/include For fast lwp_getprivate, just do the ch...



details:   https://anonhg.NetBSD.org/src/rev/f69b21f735a8
branches:  trunk
changeset: 773457:f69b21f735a8
user:      matt <matt%NetBSD.org@localhost>
date:      Thu Feb 02 18:32:16 2012 +0000

description:
For fast lwp_getprivate, just do the chmk $SYS_lwp_getprivate inline.

diffstat:

 sys/arch/vax/include/mcontext.h |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 60d273691e04 -r f69b21f735a8 sys/arch/vax/include/mcontext.h
--- a/sys/arch/vax/include/mcontext.h   Thu Feb 02 18:31:41 2012 +0000
+++ b/sys/arch/vax/include/mcontext.h   Thu Feb 02 18:32:16 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mcontext.h,v 1.7 2012/01/07 16:47:42 chs Exp $ */
+/*     $NetBSD: mcontext.h,v 1.8 2012/02/02 18:32:16 matt Exp $        */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -73,12 +73,16 @@
 
 #define        _UC_MACHINE_SET_PC(uc, pc)      _UC_MACHINE_PC(uc) = (pc)
 
+#ifndef _KERNEL
+#include <sys/syscall.h>
+
 static __inline void *
 __lwp_getprivate_fast(void)
 {
        register void *tcb __asm("r0");
-       __asm("chmu $1" ::: "r0");
+       __asm("chmk %0" :: "i"(SYS__lwp_getprivate) : "r0");
        return tcb;
 }
+#endif
 
 #endif /* !_VAX_MCONTEXT_H_ */



Home | Main Index | Thread Index | Old Index