-/* $OpenBSD: mutex.h,v 1.8 2017/04/20 13:57:29 visa Exp $ */
+/* $OpenBSD: mutex.h,v 1.9 2018/01/04 11:03:48 mpi Exp $ */
/*
* Copyright (c) 2004 Artur Grabowski <art@openbsd.org>
#include <sys/_lock.h>
struct mutex {
- void *mtx_owner;
+ volatile void *mtx_owner;
int mtx_wantipl;
int mtx_oldipl;
#ifdef WITNESS
-/* $OpenBSD: mutex.h,v 1.7 2017/04/20 13:57:29 visa Exp $ */
+/* $OpenBSD: mutex.h,v 1.8 2018/01/04 11:03:48 mpi Exp $ */
/*
* Copyright (c) 2004 Artur Grabowski <art@openbsd.org>
#endif
int mtx_wantipl;
int mtx_oldipl;
- void *mtx_owner;
+ volatile void *mtx_owner;
#ifdef WITNESS
struct lock_object mtx_lock_obj;
#endif
-# $OpenBSD: genassym.cf,v 1.39 2016/03/15 03:17:51 guenther Exp $
+# $OpenBSD: genassym.cf,v 1.40 2018/01/04 11:03:48 mpi Exp $
#
# Copyright (c) 1982, 1990 The Regents of the University of California.
# All rights reserved.
endif
struct mutex
-member mtx_lock
member mtx_wantipl
member mtx_oldipl
member mtx_owner
-/* $OpenBSD: mutex.h,v 1.9 2017/04/20 13:57:29 visa Exp $ */
+/* $OpenBSD: mutex.h,v 1.10 2018/01/04 11:03:48 mpi Exp $ */
/*
* Copyright (c) 2004 Artur Grabowski <art@openbsd.org>
#include <sys/_lock.h>
-/*
- * XXX - we don't really need the mtx_lock field, we can use mtx_oldipl
- * as the lock to save some space.
- */
struct mutex {
- volatile int mtx_lock;
int mtx_wantipl;
int mtx_oldipl;
- void *mtx_owner;
+ volatile void *mtx_owner;
#ifdef WITNESS
struct lock_object mtx_lock_obj;
#endif
#ifdef WITNESS
#define MUTEX_INITIALIZER_FLAGS(ipl, name, flags) \
- { 0, __MUTEX_IPL(ipl), 0, NULL, MTX_LO_INITIALIZER(name, flags) }
+ { __MUTEX_IPL((ipl)), 0, NULL, MTX_LO_INITIALIZER(name, flags) }
#else
#define MUTEX_INITIALIZER_FLAGS(ipl, name, flags) \
- { 0, __MUTEX_IPL(ipl), 0, NULL }
+ { __MUTEX_IPL((ipl)), 0, NULL }
#endif
void __mtx_init(struct mutex *, int);
#ifndef _M88K_MUTEX_H_
#define _M88K_MUTEX_H_
-/* $OpenBSD: mutex.h,v 1.5 2017/04/20 13:57:29 visa Exp $ */
+/* $OpenBSD: mutex.h,v 1.6 2018/01/04 11:03:48 mpi Exp $ */
/*
* Copyright (c) 2005, Miodrag Vallat.
volatile int mtx_lock; /* mutex.S relies upon this field being first */
int mtx_wantipl;
int mtx_oldipl;
- void *mtx_owner;
+ volatile void *mtx_owner;
#ifdef WITNESS
struct lock_object mtx_lock_obj;
#endif
-/* $OpenBSD: mutex.h,v 1.2 2017/04/20 13:57:30 visa Exp $ */
+/* $OpenBSD: mutex.h,v 1.3 2018/01/04 11:03:48 mpi Exp $ */
/*
* Copyright (c) 2004 Artur Grabowski <art@openbsd.org>
#include <sys/_lock.h>
struct mutex {
- void *mtx_owner;
+ volatile void *mtx_owner;
int mtx_wantipl;
int mtx_oldipl;
#ifdef WITNESS