Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/arch/arm/gen no need for linted annotations



details:   https://anonhg.NetBSD.org/src/rev/9ac6fbb0ac94
branches:  trunk
changeset: 778294:9ac6fbb0ac94
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Mar 21 14:03:06 2012 +0000

description:
no need for linted annotations

diffstat:

 lib/libc/arch/arm/gen/_lwp.c        |  23 ++++++++---------------
 lib/libc/arch/arm/gen/makecontext.c |  10 +++++-----
 2 files changed, 13 insertions(+), 20 deletions(-)

diffs (81 lines):

diff -r 3198b00c0846 -r 9ac6fbb0ac94 lib/libc/arch/arm/gen/_lwp.c
--- a/lib/libc/arch/arm/gen/_lwp.c      Wed Mar 21 13:31:40 2012 +0000
+++ b/lib/libc/arch/arm/gen/_lwp.c      Wed Mar 21 14:03:06 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: _lwp.c,v 1.6 2012/03/21 09:05:35 bsh Exp $     */
+/*     $NetBSD: _lwp.c,v 1.7 2012/03/21 14:03:06 christos Exp $        */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: _lwp.c,v 1.6 2012/03/21 09:05:35 bsh Exp $");
+__RCSID("$NetBSD: _lwp.c,v 1.7 2012/03/21 14:03:06 christos Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -58,22 +58,15 @@
        u->uc_stack.ss_sp = stack_base;
        u->uc_stack.ss_size = stack_size;
 
-       /* LINTED - alignment is fixed below. */
-       sp = (void **) (stack_base + stack_size);
-
+       sp = (void *) (stack_base + stack_size);
        /*
         * Note: We make sure the stack is 8-byte aligned, here.
         */
 
-       /* LINTED - doesn't lose any bits by this conversion */
-       u->uc_mcontext.__gregs[_REG_R0] = (__greg_t) arg;
-       /* LINTED - doesn't lose any bits by this conversion */
-       u->uc_mcontext.__gregs[_REG_SP] = ((__greg_t) sp) & ~7;
-       /* LINTED - doesn't lose any bits by this conversion */
-       u->uc_mcontext.__gregs[_REG_LR] = (__greg_t) _lwp_exit;
-       /* LINTED - doesn't lose any bits by this conversion */
-       u->uc_mcontext.__gregs[_REG_PC] = (__greg_t) start;
-       /* LINTED - unsinged long and unsigned int are same size */
-       u->uc_mcontext._mc_tlsbase = (uintptr_t)private;
+       u->uc_mcontext.__gregs[_REG_R0] = (__greg_t)(uintptr_t)arg;
+       u->uc_mcontext.__gregs[_REG_SP] = ((__greg_t)(uintptr_t)sp) & ~7;
+       u->uc_mcontext.__gregs[_REG_LR] = (__greg_t)(uintptr_t)_lwp_exit;
+       u->uc_mcontext.__gregs[_REG_PC] = (__greg_t)(uintptr_t)start;
+       u->uc_mcontext._mc_tlsbase = (__greg_t)(uintptr_t)private;
        u->uc_flags |= _UC_TLSBASE;
 }
diff -r 3198b00c0846 -r 9ac6fbb0ac94 lib/libc/arch/arm/gen/makecontext.c
--- a/lib/libc/arch/arm/gen/makecontext.c       Wed Mar 21 13:31:40 2012 +0000
+++ b/lib/libc/arch/arm/gen/makecontext.c       Wed Mar 21 14:03:06 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: makecontext.c,v 1.3 2008/04/28 20:22:55 martin Exp $   */
+/*     $NetBSD: makecontext.c,v 1.4 2012/03/21 14:03:06 christos Exp $ */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: makecontext.c,v 1.3 2008/04/28 20:22:55 martin Exp $");
+__RCSID("$NetBSD: makecontext.c,v 1.4 2012/03/21 14:03:06 christos Exp $");
 #endif
 
 #include <stddef.h>
@@ -55,12 +55,12 @@
        /* Allocate necessary stack space for arguments exceeding r0-3. */
        if (argc > 4)
                sp -= argc - 4;
-       gr[_REG_SP] = (__greg_t)sp;
+       gr[_REG_SP] = (__greg_t)(uintptr_t)sp;
        /* Wipe out frame pointer. */
        gr[_REG_FP] = 0;
        /* Arrange for return via the trampoline code. */
-       gr[_REG_LR] = (__greg_t)_resumecontext;
-       gr[_REG_PC] = (__greg_t)func;
+       gr[_REG_LR] = (__greg_t)(uintptr_t)_resumecontext;
+       gr[_REG_PC] = (__greg_t)(uintptr_t)func;
 
        va_start(ap, argc);
        /* Pass up to four arguments in r0-3. */



Home | Main Index | Thread Index | Old Index