Source-Changes-HG archive

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

[src/trunk]: src/lib/libpthread/arch/riscv We have _REG_SP so use it.



details:   https://anonhg.NetBSD.org/src/rev/0b546366f8eb
branches:  trunk
changeset: 337045:0b546366f8eb
user:      matt <matt%NetBSD.org@localhost>
date:      Tue Mar 31 01:36:27 2015 +0000

description:
We have _REG_SP so use it.

diffstat:

 lib/libpthread/arch/riscv/pthread_md.h |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (29 lines):

diff -r 5cce52219ed0 -r 0b546366f8eb lib/libpthread/arch/riscv/pthread_md.h
--- a/lib/libpthread/arch/riscv/pthread_md.h    Tue Mar 31 01:30:50 2015 +0000
+++ b/lib/libpthread/arch/riscv/pthread_md.h    Tue Mar 31 01:36:27 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pthread_md.h,v 1.1 2014/09/19 17:36:25 matt Exp $      */
+/*     $NetBSD: pthread_md.h,v 1.2 2015/03/31 01:36:27 matt Exp $      */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -29,8 +29,8 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef _LIB_PTHREAD_OR1K_MD_H
-#define _LIB_PTHREAD_OR1K_MD_H
+#ifndef _LIB_PTHREAD_RISCV_MD_H
+#define _LIB_PTHREAD_RISCV_MD_H
 
 static inline unsigned long
 pthread__sp(void)
@@ -42,6 +42,6 @@
        return ret;
 }
 
-#define pthread__uc_sp(ucp) ((ucp)->uc_mcontext.__gregs[1])
+#define pthread__uc_sp(ucp) ((ucp)->uc_mcontext.__gregs[_REG_SP])
 
-#endif /* _LIB_PTHREAD_OR1K_MD_H */
+#endif /* _LIB_PTHREAD_RISCV_MD_H */



Home | Main Index | Thread Index | Old Index