1177957Sattilio/*-
2177957Sattilio * Copyright (c) 2008 Attilio Rao <attilio@FreeBSD.org>
3177957Sattilio * All rights reserved.
4177957Sattilio *
5177957Sattilio * Redistribution and use in source and binary forms, with or without
6177957Sattilio * modification, are permitted provided that the following conditions
7177957Sattilio * are met:
8177957Sattilio * 1. Redistributions of source code must retain the above copyright
9177957Sattilio *    notice(s), this list of conditions and the following disclaimer as
10177957Sattilio *    the first lines of this file unmodified other than the possible
11177957Sattilio *    addition of one or more copyright notices.
12177957Sattilio * 2. Redistributions in binary form must reproduce the above copyright
13177957Sattilio *    notice(s), this list of conditions and the following disclaimer in the
14177957Sattilio *    documentation and/or other materials provided with the distribution.
15177957Sattilio *
16177957Sattilio * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY
17177957Sattilio * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18177957Sattilio * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19177957Sattilio * DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
20177957Sattilio * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21177957Sattilio * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22177957Sattilio * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23177957Sattilio * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24177957Sattilio * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25177957Sattilio * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
26177957Sattilio * DAMAGE.
27177957Sattilio *
28177957Sattilio * $FreeBSD$
29177957Sattilio */
30177957Sattilio
31177957Sattilio#ifndef _SYS__LOCKMGR_H_
32177957Sattilio#define	_SYS__LOCKMGR_H_
33177957Sattilio
34177957Sattilio#ifdef DEBUG_LOCKS
35177957Sattilio#include <sys/_stack.h>
36177957Sattilio#endif
37177957Sattilio
38177957Sattiliostruct lock {
39177957Sattilio	struct lock_object	lock_object;
40177957Sattilio	volatile uintptr_t	lk_lock;
41200447Sattilio	u_int			lk_exslpfail;
42177957Sattilio	int			lk_timo;
43177957Sattilio	int			lk_pri;
44177957Sattilio#ifdef DEBUG_LOCKS
45177957Sattilio	struct stack		lk_stack;
46177957Sattilio#endif
47177957Sattilio};
48177957Sattilio
49177957Sattilio#endif
50