Source-Changes-HG archive

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

[src/nathanw_sa]: src/lib/libpthread/arch/alpha Define _INITCONTEXT_U_MD() to...



details:   https://anonhg.NetBSD.org/src/rev/d1be4b7a90ef
branches:  nathanw_sa
changeset: 506385:d1be4b7a90ef
user:      nathanw <nathanw%NetBSD.org@localhost>
date:      Tue Oct 22 01:27:24 2002 +0000

description:
Define _INITCONTEXT_U_MD() to set the status register to a reasonable value.

diffstat:

 lib/libpthread/arch/alpha/pthread_md.h |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (23 lines):

diff -r dca0e3958992 -r d1be4b7a90ef lib/libpthread/arch/alpha/pthread_md.h
--- a/lib/libpthread/arch/alpha/pthread_md.h    Tue Oct 22 01:26:42 2002 +0000
+++ b/lib/libpthread/arch/alpha/pthread_md.h    Tue Oct 22 01:27:24 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pthread_md.h,v 1.1.2.4 2002/08/06 20:06:50 nathanw Exp $       */
+/*     $NetBSD: pthread_md.h,v 1.1.2.5 2002/10/22 01:27:24 nathanw Exp $       */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -52,6 +52,13 @@
 #define pthread__uc_sp(ucp) ((ucp)->uc_mcontext.__gregs[_REG_SP])
 #define pthread__uc_pc(ucp) ((ucp)->uc_mcontext.__gregs[_REG_PC])
 
+/*
+ * Set initial, sane values for registers whose values aren't just
+ * "don't care".
+ * 0x0008 is ALPHA_PSL_USERSET from arch/alpha/include/alpha_cpu.h
+ */
+#define _INITCONTEXT_U_MD(ucp)                                         \
+       (ucp)->uc_mcontext.__gregs[_REG_PS] = 0x0008;
 #define STACKSPACE 32  /* 4 quad values */
 /*
  * Conversions between struct reg and struct mcontext. Used by



Home | Main Index | Thread Index | Old Index