Deleted Added
full compact
lock.h (187511) lock.h (192853)
1/*-
2 * Copyright (c) 1997 Berkeley Software Design, Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 12 unchanged lines hidden (view full) ---

21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 * from BSDI $Id: mutex.h,v 2.7.2.35 2000/04/27 03:10:26 cp Exp $
1/*-
2 * Copyright (c) 1997 Berkeley Software Design, Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 12 unchanged lines hidden (view full) ---

21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 * from BSDI $Id: mutex.h,v 2.7.2.35 2000/04/27 03:10:26 cp Exp $
29 * $FreeBSD: head/sys/sys/lock.h 187511 2009-01-21 04:19:18Z thompsa $
29 * $FreeBSD: head/sys/sys/lock.h 192853 2009-05-26 20:28:22Z sson $
30 */
31
32#ifndef _SYS_LOCK_H_
33#define _SYS_LOCK_H_
34
35#include <sys/queue.h>
36#include <sys/_lock.h>
37

--- 18 unchanged lines hidden (view full) ---

56 */
57
58struct lock_class {
59 const char *lc_name;
60 u_int lc_flags;
61 void (*lc_assert)(struct lock_object *lock, int what);
62 void (*lc_ddb_show)(struct lock_object *lock);
63 void (*lc_lock)(struct lock_object *lock, int how);
30 */
31
32#ifndef _SYS_LOCK_H_
33#define _SYS_LOCK_H_
34
35#include <sys/queue.h>
36#include <sys/_lock.h>
37

--- 18 unchanged lines hidden (view full) ---

56 */
57
58struct lock_class {
59 const char *lc_name;
60 u_int lc_flags;
61 void (*lc_assert)(struct lock_object *lock, int what);
62 void (*lc_ddb_show)(struct lock_object *lock);
63 void (*lc_lock)(struct lock_object *lock, int how);
64 int (*lc_owner)(struct lock_object *lock, struct thread **owner);
64 int (*lc_unlock)(struct lock_object *lock);
65};
66
67#define LC_SLEEPLOCK 0x00000001 /* Sleep lock. */
68#define LC_SPINLOCK 0x00000002 /* Spin lock. */
69#define LC_SLEEPABLE 0x00000004 /* Sleeping allowed with this lock. */
70#define LC_RECURSABLE 0x00000008 /* Locks of this type may recurse. */
71#define LC_UPGRADABLE 0x00000010 /* Upgrades and downgrades permitted. */

--- 245 unchanged lines hidden ---
65 int (*lc_unlock)(struct lock_object *lock);
66};
67
68#define LC_SLEEPLOCK 0x00000001 /* Sleep lock. */
69#define LC_SPINLOCK 0x00000002 /* Spin lock. */
70#define LC_SLEEPABLE 0x00000004 /* Sleeping allowed with this lock. */
71#define LC_RECURSABLE 0x00000008 /* Locks of this type may recurse. */
72#define LC_UPGRADABLE 0x00000010 /* Upgrades and downgrades permitted. */

--- 245 unchanged lines hidden ---