Module Name: src Committed By: christos Date: Wed Mar 21 14:03:06 UTC 2012
Modified Files: src/lib/libc/arch/arm/gen: _lwp.c makecontext.c Log Message: no need for linted annotations To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libc/arch/arm/gen/_lwp.c cvs rdiff -u -r1.3 -r1.4 src/lib/libc/arch/arm/gen/makecontext.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libc/arch/arm/gen/_lwp.c diff -u src/lib/libc/arch/arm/gen/_lwp.c:1.6 src/lib/libc/arch/arm/gen/_lwp.c:1.7 --- src/lib/libc/arch/arm/gen/_lwp.c:1.6 Wed Mar 21 05:05:35 2012 +++ src/lib/libc/arch/arm/gen/_lwp.c Wed Mar 21 10:03:06 2012 @@ -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 @@ _lwp_makecontext(ucontext_t *u, void (*s 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; } Index: src/lib/libc/arch/arm/gen/makecontext.c diff -u src/lib/libc/arch/arm/gen/makecontext.c:1.3 src/lib/libc/arch/arm/gen/makecontext.c:1.4 --- src/lib/libc/arch/arm/gen/makecontext.c:1.3 Mon Apr 28 16:22:55 2008 +++ src/lib/libc/arch/arm/gen/makecontext.c Wed Mar 21 10:03:06 2012 @@ -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 @@ makecontext(ucontext_t *ucp, void (*func /* 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. */