Use C99-style struct member initialization for lock classes.

This commit is contained in:
John Baldwin 2007-03-09 16:04:44 +00:00
parent 07bb813626
commit ae8dde30c2
3 changed files with 12 additions and 12 deletions

View File

@ -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
};

View File

@ -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
};

View File

@ -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
};