Deleted Added
full compact
kern_rwlock.c (155061) kern_rwlock.c (155162)
1/*-
2 * Copyright (c) 2006 John Baldwin <jhb@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

27 * SUCH DAMAGE.
28 */
29
30/*
31 * Machine independent bits of reader/writer lock implementation.
32 */
33
34#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2006 John Baldwin <jhb@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

27 * SUCH DAMAGE.
28 */
29
30/*
31 * Machine independent bits of reader/writer lock implementation.
32 */
33
34#include <sys/cdefs.h>
35__FBSDID("$FreeBSD: head/sys/kern/kern_rwlock.c 155061 2006-01-30 19:25:52Z scottl $");
35__FBSDID("$FreeBSD: head/sys/kern/kern_rwlock.c 155162 2006-02-01 04:18:07Z scottl $");
36
37#include "opt_ddb.h"
38
39#include <sys/param.h>
40#include <sys/ktr.h>
41#include <sys/lock.h>
42#include <sys/mutex.h>
43#include <sys/proc.h>

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

484
485 /* Wake up all waiters for the specific queue. */
486 turnstile_broadcast(ts, queue);
487 atomic_store_rel_ptr(&rw->rw_lock, v);
488 turnstile_unpend(ts, TS_EXCLUSIVE_LOCK);
489}
490
491#ifdef INVARIANT_SUPPORT
36
37#include "opt_ddb.h"
38
39#include <sys/param.h>
40#include <sys/ktr.h>
41#include <sys/lock.h>
42#include <sys/mutex.h>
43#include <sys/proc.h>

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

484
485 /* Wake up all waiters for the specific queue. */
486 turnstile_broadcast(ts, queue);
487 atomic_store_rel_ptr(&rw->rw_lock, v);
488 turnstile_unpend(ts, TS_EXCLUSIVE_LOCK);
489}
490
491#ifdef INVARIANT_SUPPORT
492#ifndef INVARIANT_SUPPORT
492#ifndef INVARIANTS
493#undef _rw_assert
494#endif
495
496/*
497 * In the non-WITNESS case, rw_assert() can only detect that at least
498 * *some* thread owns an rlock, but it cannot guarantee that *this*
499 * thread owns an rlock.
500 */

--- 88 unchanged lines hidden ---
493#undef _rw_assert
494#endif
495
496/*
497 * In the non-WITNESS case, rw_assert() can only detect that at least
498 * *some* thread owns an rlock, but it cannot guarantee that *this*
499 * thread owns an rlock.
500 */

--- 88 unchanged lines hidden ---