summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_devstat.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1999-10-02 07:34:11 +0000
committerbde <bde@FreeBSD.org>1999-10-02 07:34:11 +0000
commitf3f63c0ef86eb93c9e6a11097cb2328724a62026 (patch)
tree63796e9b0fb85971dc925ebcc5655efaaee1dc46 /sys/kern/subr_devstat.c
parentcaded970e8430639c7a140227ee85bed679f2498 (diff)
downloadFreeBSD-src-f3f63c0ef86eb93c9e6a11097cb2328724a62026.zip
FreeBSD-src-f3f63c0ef86eb93c9e6a11097cb2328724a62026.tar.gz
Removed unnecessary splclock() protection for getmicrotime() and
getmicrouptime(). Removed unused includes. Reviewed by: ken
Diffstat (limited to 'sys/kern/subr_devstat.c')
-rw-r--r--sys/kern/subr_devstat.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/sys/kern/subr_devstat.c b/sys/kern/subr_devstat.c
index b263349..23b397a 100644
--- a/sys/kern/subr_devstat.c
+++ b/sys/kern/subr_devstat.c
@@ -31,8 +31,6 @@
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/systm.h>
-#include <sys/time.h>
-#include <sys/types.h>
#include <sys/buf.h>
#include <sys/sysctl.h>
@@ -56,7 +54,6 @@ devstat_add_entry(struct devstat *ds, const char *dev_name,
devstat_type_flags device_type,
devstat_priority priority)
{
- int s;
struct devstatlist *devstat_head;
struct devstat *ds_tmp;
@@ -132,10 +129,7 @@ devstat_add_entry(struct devstat *ds, const char *dev_name,
ds->flags = flags;
ds->device_type = device_type;
ds->priority = priority;
-
- s = splclock();
getmicrotime(&ds->dev_creation_time);
- splx(s);
}
/*
@@ -164,8 +158,6 @@ devstat_remove_entry(struct devstat *ds)
void
devstat_start_transaction(struct devstat *ds)
{
- int s;
-
/* sanity check */
if (ds == NULL)
return;
@@ -175,11 +167,8 @@ devstat_start_transaction(struct devstat *ds)
* to busy. The start time is really the start of the latest busy
* period.
*/
- if (ds->busy_count == 0) {
- s = splclock();
+ if (ds->busy_count == 0)
getmicrouptime(&ds->start_time);
- splx(s);
- }
ds->busy_count++;
}
@@ -190,17 +179,13 @@ void
devstat_end_transaction(struct devstat *ds, u_int32_t bytes,
devstat_tag_type tag_type, devstat_trans_flags flags)
{
- int s;
struct timeval busy_time;
/* sanity check */
if (ds == NULL)
return;
- s = splclock();
getmicrouptime(&ds->last_comp_time);
- splx(s);
-
ds->busy_count--;
/*
OpenPOWER on IntegriCloud