Use C99-style struct member initialization for lock classes.
This commit is contained in:
parent
07bb813626
commit
ae8dde30c2
@ -96,17 +96,17 @@ static void db_show_mtx(struct lock_object *lock);
|
||||
* Lock classes for sleep and spin mutexes.
|
||||
*/
|
||||
struct lock_class lock_class_mtx_sleep = {
|
||||
"sleep mutex",
|
||||
LC_SLEEPLOCK | LC_RECURSABLE,
|
||||
.lc_name = "sleep mutex",
|
||||
.lc_flags = LC_SLEEPLOCK | LC_RECURSABLE,
|
||||
#ifdef DDB
|
||||
db_show_mtx
|
||||
.lc_ddb_show = db_show_mtx,
|
||||
#endif
|
||||
};
|
||||
struct lock_class lock_class_mtx_spin = {
|
||||
"spin mutex",
|
||||
LC_SPINLOCK | LC_RECURSABLE,
|
||||
.lc_name = "spin mutex",
|
||||
.lc_flags = LC_SPINLOCK | LC_RECURSABLE,
|
||||
#ifdef DDB
|
||||
db_show_mtx
|
||||
.lc_ddb_show = db_show_mtx,
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -54,10 +54,10 @@ static void db_show_rwlock(struct lock_object *lock);
|
||||
#endif
|
||||
|
||||
struct lock_class lock_class_rw = {
|
||||
"rw",
|
||||
LC_SLEEPLOCK | LC_RECURSABLE | LC_UPGRADABLE,
|
||||
.lc_name = "rw",
|
||||
.lc_flags = LC_SLEEPLOCK | LC_RECURSABLE | LC_UPGRADABLE,
|
||||
#ifdef DDB
|
||||
db_show_rwlock
|
||||
.lc_ddb_show = db_show_rwlock,
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -56,10 +56,10 @@ static void db_show_sx(struct lock_object *lock);
|
||||
#endif
|
||||
|
||||
struct lock_class lock_class_sx = {
|
||||
"sx",
|
||||
LC_SLEEPLOCK | LC_SLEEPABLE | LC_RECURSABLE | LC_UPGRADABLE,
|
||||
.lc_name = "sx",
|
||||
.lc_flags = LC_SLEEPLOCK | LC_SLEEPABLE | LC_RECURSABLE | LC_UPGRADABLE,
|
||||
#ifdef DDB
|
||||
db_show_sx
|
||||
.lc_ddb_show = db_show_sx,
|
||||
#endif
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user