Module Name: src Committed By: pooka Date: Fri Jun 26 10:05:18 UTC 2015
Modified Files: src/lib/libpthread: pthread_types.h Log Message: Don't depend on __CPU_SIMPLE_LOCK_PAD to determine the type of __cpu_simple_lock_t (because it doesn't). Instead, use sizeof/alignof with a struct { uchar[] }. Fixes problem in previous commit, caught by Nick Hudson. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/lib/libpthread/pthread_types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libpthread/pthread_types.h diff -u src/lib/libpthread/pthread_types.h:1.14 src/lib/libpthread/pthread_types.h:1.15 --- src/lib/libpthread/pthread_types.h:1.14 Fri Jun 26 01:33:08 2015 +++ src/lib/libpthread/pthread_types.h Fri Jun 26 10:05:17 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: pthread_types.h,v 1.14 2015/06/26 01:33:08 pooka Exp $ */ +/* $NetBSD: pthread_types.h,v 1.15 2015/06/26 10:05:17 pooka Exp $ */ /*- * Copyright (c) 2001, 2008 The NetBSD Foundation, Inc. @@ -89,11 +89,9 @@ struct __pthread_attr_st { * does not touch the guts of those types, we redefine them as non-volatile */ #ifdef __cplusplus -# ifdef __CPU_SIMPLE_LOCK_PAD -# define __pthread_spin_t unsigned char -# else -# define __pthread_spin_t unsigned int -# endif +# define __pthread_spin_t \ + struct { unsigned char _simplelock[sizeof(__cpu_simple_lock_t)]; } \ + __aligned(__alignof(__cpu_simple_lock_t)) # define __pthread_volatile #else /* __cplusplus */ # define __pthread_spin_t pthread_spin_t