Source-Changes-HG archive

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

[src/nathanw_sa]: src/lib/libpthread If _UC_UCONTEXT_ALIGN is defined, use it...



details:   https://anonhg.NetBSD.org/src/rev/c091a187c126
branches:  nathanw_sa
changeset: 506597:c091a187c126
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Dec 19 02:42:59 2002 +0000

description:
If _UC_UCONTEXT_ALIGN is defined, use it to align the ucontext_t
that is used to provide the signal delivery context.

(This is only needed because we're using our own userland versions
of the context routines; this is not needed if we use the kernel
versions of the routines...)

diffstat:

 lib/libpthread/pthread_sig.c |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (19 lines):

diff -r a792bf6abeb1 -r c091a187c126 lib/libpthread/pthread_sig.c
--- a/lib/libpthread/pthread_sig.c      Thu Dec 19 02:26:13 2002 +0000
+++ b/lib/libpthread/pthread_sig.c      Thu Dec 19 02:42:59 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pthread_sig.c,v 1.1.2.20 2002/11/02 00:28:16 nathanw Exp $     */
+/*     $NetBSD: pthread_sig.c,v 1.1.2.21 2002/12/19 02:42:59 thorpej Exp $     */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -502,6 +502,9 @@
         */
        uc = (ucontext_t *)((char *)maskp - 
            STACKSPACE - sizeof(ucontext_t));
+#ifdef _UC_UCONTEXT_ALIGN
+       uc = (ucontext_t *)((uintptr_t)uc & _UC_UCONTEXT_ALIGN);
+#endif
 
        _INITCONTEXT_U(uc);
        uc->uc_stack.ss_sp = maskp;



Home | Main Index | Thread Index | Old Index