diff options
author | anton <anton@cvs.openbsd.org> | 2020-07-04 08:06:09 +0000 |
---|---|---|
committer | anton <anton@cvs.openbsd.org> | 2020-07-04 08:06:09 +0000 |
commit | 1faadd8c36a6a487d4e3f4fd54fe416e1f280b37 (patch) | |
tree | 6f5235b7628fb30392e139ca02b89dd42c95539c /sys/kern | |
parent | 666a3dd14c457152cb5ed221352bd68aa1d26f07 (diff) |
It's been agreed upon that global locks should be expressed using
capital letters in locking annotations. Therefore harmonize the existing
annotations.
Also, if multiple locks are required they should be delimited using
commas.
ok mpi@
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_tc.c | 32 | ||||
-rw-r--r-- | sys/kern/kern_timeout.c | 12 |
2 files changed, 22 insertions, 22 deletions
diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c index fa9591c2683..c3c0ee07fbb 100644 --- a/sys/kern/kern_tc.c +++ b/sys/kern/kern_tc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_tc.c,v 1.60 2020/07/02 23:30:38 cheloha Exp $ */ +/* $OpenBSD: kern_tc.c,v 1.61 2020/07/04 08:06:07 anton Exp $ */ /* * Copyright (c) 2000 Poul-Henning Kamp <phk@FreeBSD.org> @@ -69,24 +69,24 @@ static struct timecounter dummy_timecounter = { /* * Locks used to protect struct members, global variables in this file: * I immutable after initialization - * t tc_lock - * w windup_mtx + * T tc_lock + * W windup_mtx */ struct timehands { /* These fields must be initialized by the driver. */ - struct timecounter *th_counter; /* [w] */ - int64_t th_adjtimedelta; /* [tw] */ - int64_t th_adjustment; /* [w] */ - u_int64_t th_scale; /* [w] */ - u_int th_offset_count; /* [w] */ - struct bintime th_boottime; /* [tw] */ - struct bintime th_offset; /* [w] */ - struct bintime th_naptime; /* [w] */ - struct timeval th_microtime; /* [w] */ - struct timespec th_nanotime; /* [w] */ + struct timecounter *th_counter; /* [W] */ + int64_t th_adjtimedelta; /* [T,W] */ + int64_t th_adjustment; /* [W] */ + u_int64_t th_scale; /* [W] */ + u_int th_offset_count; /* [W] */ + struct bintime th_boottime; /* [T,W] */ + struct bintime th_offset; /* [W] */ + struct bintime th_naptime; /* [W] */ + struct timeval th_microtime; /* [W] */ + struct timespec th_nanotime; /* [W] */ /* Fields not to be copied in tc_windup start with th_generation. */ - volatile u_int th_generation; /* [w] */ + volatile u_int th_generation; /* [W] */ struct timehands *th_next; /* [I] */ }; @@ -109,8 +109,8 @@ struct rwlock tc_lock = RWLOCK_INITIALIZER("tc_lock"); */ struct mutex windup_mtx = MUTEX_INITIALIZER(IPL_CLOCK); -static struct timehands *volatile timehands = &th0; /* [w] */ -struct timecounter *timecounter = &dummy_timecounter; /* [t] */ +static struct timehands *volatile timehands = &th0; /* [W] */ +struct timecounter *timecounter = &dummy_timecounter; /* [T] */ static SLIST_HEAD(, timecounter) tc_list = SLIST_HEAD_INITIALIZER(tc_list); /* diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c index eab14f2da7b..b67c5a2163e 100644 --- a/sys/kern/kern_timeout.c +++ b/sys/kern/kern_timeout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_timeout.c,v 1.72 2020/02/18 12:13:40 mpi Exp $ */ +/* $OpenBSD: kern_timeout.c,v 1.73 2020/07/04 08:06:08 anton Exp $ */ /* * Copyright (c) 2001 Thomas Nordin <nordin@openbsd.org> * Copyright (c) 2000-2001 Artur Grabowski <art@openbsd.org> @@ -47,12 +47,12 @@ * Locks used to protect global variables in this file: * * I immutable after initialization - * t timeout_mutex + * T timeout_mutex */ struct mutex timeout_mutex = MUTEX_INITIALIZER(IPL_HIGH); void *softclock_si; /* [I] softclock() interrupt handle */ -struct timeoutstat tostat; /* [t] statistics and totals */ +struct timeoutstat tostat; /* [T] statistics and totals */ /* * Timeouts are kept in a hierarchical timing wheel. The to_time is the value @@ -64,9 +64,9 @@ struct timeoutstat tostat; /* [t] statistics and totals */ #define WHEELMASK 255 #define WHEELBITS 8 -struct circq timeout_wheel[BUCKETS]; /* [t] Queues of timeouts */ -struct circq timeout_todo; /* [t] Due or needs scheduling */ -struct circq timeout_proc; /* [t] Due + needs process context */ +struct circq timeout_wheel[BUCKETS]; /* [T] Queues of timeouts */ +struct circq timeout_todo; /* [T] Due or needs scheduling */ +struct circq timeout_proc; /* [T] Due + needs process context */ #define MASKWHEEL(wheel, time) (((time) >> ((wheel)*WHEELBITS)) & WHEELMASK) |