Deleted Added
full compact
kern_rmlock.c (173520) kern_rmlock.c (173733)
1/*-
2 * Copyright (c) 2007 Stephan Uphoff <ups@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) 2007 Stephan Uphoff <ups@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_rmlock.c 173520 2007-11-10 15:06:30Z rwatson $");
35__FBSDID("$FreeBSD: head/sys/kern/kern_rmlock.c 173733 2007-11-18 14:43:53Z attilio $");
36
37#include "opt_ddb.h"
38
39#include <sys/param.h>
40#include <sys/systm.h>
41
42#include <sys/kernel.h>
43#include <sys/ktr.h>

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

66 * Using this lock for cv and msleep also does
67 * not seem very useful
68 */
69
70static __inline void compiler_memory_barrier(void) {
71 __asm __volatile("":::"memory");
72}
73
36
37#include "opt_ddb.h"
38
39#include <sys/param.h>
40#include <sys/systm.h>
41
42#include <sys/kernel.h>
43#include <sys/ktr.h>

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

66 * Using this lock for cv and msleep also does
67 * not seem very useful
68 */
69
70static __inline void compiler_memory_barrier(void) {
71 __asm __volatile("":::"memory");
72}
73
74static void assert_rm(struct lock_object *lock, int what);
74static void lock_rm(struct lock_object *lock, int how);
75static int unlock_rm(struct lock_object *lock);
76
77struct lock_class lock_class_rm = {
78 .lc_name = "rm",
79 .lc_flags = LC_SLEEPLOCK | LC_RECURSABLE,
75static void lock_rm(struct lock_object *lock, int how);
76static int unlock_rm(struct lock_object *lock);
77
78struct lock_class lock_class_rm = {
79 .lc_name = "rm",
80 .lc_flags = LC_SLEEPLOCK | LC_RECURSABLE,
81 .lc_assert = assert_rm,
80#if 0
81#ifdef DDB
82 .lc_ddb_show = db_show_rwlock,
83#endif
84#endif
85 .lc_lock = lock_rm,
86 .lc_unlock = unlock_rm,
87};
88
89static void
82#if 0
83#ifdef DDB
84 .lc_ddb_show = db_show_rwlock,
85#endif
86#endif
87 .lc_lock = lock_rm,
88 .lc_unlock = unlock_rm,
89};
90
91static void
92assert_rm(struct lock_object *lock, int what)
93{
94
95 panic("assert_rm called");
96}
97
98static void
90lock_rm(struct lock_object *lock, int how) {
91 panic("lock_rm called");
92}
93
94static int
95unlock_rm(struct lock_object *lock) {
96 panic("unlock_rm called");
97}

--- 410 unchanged lines hidden ---
99lock_rm(struct lock_object *lock, int how) {
100 panic("lock_rm called");
101}
102
103static int
104unlock_rm(struct lock_object *lock) {
105 panic("unlock_rm called");
106}

--- 410 unchanged lines hidden ---