Source-Changes-HG archive

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

[src/nathanw_sa]: src/lib/libc/arch/i386/gen Delint (Thanks to Havard for kic...



details:   https://anonhg.NetBSD.org/src/rev/74240394ef52
branches:  nathanw_sa
changeset: 505478:74240394ef52
user:      nathanw <nathanw%NetBSD.org@localhost>
date:      Tue Dec 18 21:25:24 2001 +0000

description:
Delint (Thanks to Havard for kicking my butt into doing this).

diffstat:

 lib/libc/arch/i386/gen/_lwp.c |  14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diffs (34 lines):

diff -r 9dbd52f42809 -r 74240394ef52 lib/libc/arch/i386/gen/_lwp.c
--- a/lib/libc/arch/i386/gen/_lwp.c     Mon Dec 17 22:10:02 2001 +0000
+++ b/lib/libc/arch/i386/gen/_lwp.c     Tue Dec 18 21:25:24 2001 +0000
@@ -1,7 +1,8 @@
-/*     $Id: _lwp.c,v 1.1.2.1 2001/03/05 23:34:37 nathanw Exp $ */
+/*     $Id: _lwp.c,v 1.1.2.2 2001/12/18 21:25:24 nathanw Exp $ */
 
 /* Copyright */
 
+#include <inttypes.h>
 #include <sys/types.h>
 #include <ucontext.h>
 #include <lwp.h>
@@ -20,12 +21,17 @@
        u->uc_stack.ss_sp = stack_base;
        u->uc_stack.ss_size = stack_size;
 
-       u->uc_mcontext.__gregs[_REG_EIP] = (int)start;
+       /* LINTED uintptr_t is safe */
+       u->uc_mcontext.__gregs[_REG_EIP] = (uintptr_t)start;
        
-       sp = (void **) (stack_base + stack_size);
+       /* Align to a word */
+       sp = (void **) ((uintptr_t)(stack_base + stack_size) & ~0x3);
        
        *--sp = arg;
        *--sp = (void *) _lwp_exit;
+       
+       /* LINTED uintptr_t is safe */
+       u->uc_mcontext.__gregs[_REG_UESP] = (uintptr_t) sp;
 
-       u->uc_mcontext.__gregs[_REG_UESP] = (int) sp;
+       /* LINTED private is currently unused */
 }



Home | Main Index | Thread Index | Old Index