Deleted Added
full compact
kern_sx.c (217326) kern_sx.c (219819)
1/*-
2 * Copyright (c) 2007 Attilio Rao <attilio@freebsd.org>
3 * Copyright (c) 2001 Jason Evans <jasone@freebsd.org>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

36 * so should not be relied upon in combination with sx locks.
37 */
38
39#include "opt_ddb.h"
40#include "opt_kdtrace.h"
41#include "opt_no_adaptive_sx.h"
42
43#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2007 Attilio Rao <attilio@freebsd.org>
3 * Copyright (c) 2001 Jason Evans <jasone@freebsd.org>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

36 * so should not be relied upon in combination with sx locks.
37 */
38
39#include "opt_ddb.h"
40#include "opt_kdtrace.h"
41#include "opt_no_adaptive_sx.h"
42
43#include <sys/cdefs.h>
44__FBSDID("$FreeBSD: head/sys/kern/kern_sx.c 217326 2011-01-12 19:54:19Z mdf $");
44__FBSDID("$FreeBSD: head/sys/kern/kern_sx.c 219819 2011-03-21 09:40:01Z jeff $");
45
46#include <sys/param.h>
47#include <sys/ktr.h>
48#include <sys/lock.h>
49#include <sys/mutex.h>
50#include <sys/proc.h>
51#include <sys/sleepqueue.h>
52#include <sys/sx.h>

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

189}
190#endif
191
192void
193sx_sysinit(void *arg)
194{
195 struct sx_args *sargs = arg;
196
45
46#include <sys/param.h>
47#include <sys/ktr.h>
48#include <sys/lock.h>
49#include <sys/mutex.h>
50#include <sys/proc.h>
51#include <sys/sleepqueue.h>
52#include <sys/sx.h>

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

189}
190#endif
191
192void
193sx_sysinit(void *arg)
194{
195 struct sx_args *sargs = arg;
196
197 sx_init(sargs->sa_sx, sargs->sa_desc);
197 sx_init_flags(sargs->sa_sx, sargs->sa_desc, sargs->sa_flags);
198}
199
200void
201sx_init_flags(struct sx *sx, const char *description, int opts)
202{
203 int flags;
204
205 MPASS((opts & ~(SX_QUIET | SX_RECURSE | SX_NOWITNESS | SX_DUPOK |

--- 956 unchanged lines hidden ---
198}
199
200void
201sx_init_flags(struct sx *sx, const char *description, int opts)
202{
203 int flags;
204
205 MPASS((opts & ~(SX_QUIET | SX_RECURSE | SX_NOWITNESS | SX_DUPOK |

--- 956 unchanged lines hidden ---