summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-09-27 21:05:05 +0000
committerphk <phk@FreeBSD.org>2002-09-27 21:05:05 +0000
commitf0a4656fe324bd391d2057ac5a37d5fecb9371e4 (patch)
tree2ffc8552e13d11634c25c57ec6a10ee19126f395 /sys
parent7f365f22fc46386a368e19f650f3f78ea4a5dd6c (diff)
downloadFreeBSD-src-f0a4656fe324bd391d2057ac5a37d5fecb9371e4.zip
FreeBSD-src-f0a4656fe324bd391d2057ac5a37d5fecb9371e4.tar.gz
Various no-ops:
Add a __unused. Make the 2byte decoder functions return 16 bits for the benefits of picky lints. No need to grab giant around a tsleep() when we have a timeout. Sponsored by: DARPA & NAI Labs.
Diffstat (limited to 'sys')
-rw-r--r--sys/geom/geom.h4
-rw-r--r--sys/geom/geom_dev.c2
-rw-r--r--sys/geom/geom_enc.c4
-rw-r--r--sys/geom/geom_kern.c6
4 files changed, 5 insertions, 11 deletions
diff --git a/sys/geom/geom.h b/sys/geom/geom.h
index 018c8f6..a5f35f1 100644
--- a/sys/geom/geom.h
+++ b/sys/geom/geom.h
@@ -295,9 +295,9 @@ extern struct sx topology_lock;
#define GEOMGETCONF _IOWR('G', 0, struct sbuf)
/* geom_enc.c */
-uint32_t g_dec_be2(u_char *p);
+uint16_t g_dec_be2(u_char *p);
uint32_t g_dec_be4(u_char *p);
-uint32_t g_dec_le2(u_char *p);
+uint16_t g_dec_le2(u_char *p);
uint32_t g_dec_le4(u_char *p);
uint64_t g_dec_le8(u_char *p);
void g_enc_le4(u_char *p, uint32_t u);
diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c
index 9b058c8..f492967 100644
--- a/sys/geom/geom_dev.c
+++ b/sys/geom/geom_dev.c
@@ -86,7 +86,7 @@ static struct g_class g_dev_class = {
};
static void
-g_dev_clone(void *arg, char *name, int namelen, dev_t *dev)
+g_dev_clone(void *arg, char *name, int namelen __unused, dev_t *dev)
{
struct g_geom *gp;
diff --git a/sys/geom/geom_enc.c b/sys/geom/geom_enc.c
index ebb1bd1..dde384c 100644
--- a/sys/geom/geom_enc.c
+++ b/sys/geom/geom_enc.c
@@ -62,7 +62,7 @@
#include <geom/geom.h>
#include <geom/geom_int.h>
-uint32_t
+uint16_t
g_dec_be2(u_char *p)
{
@@ -76,7 +76,7 @@ g_dec_be4(u_char *p)
return((p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]);
}
-uint32_t
+uint16_t
g_dec_le2(u_char *p)
{
diff --git a/sys/geom/geom_kern.c b/sys/geom/geom_kern.c
index ac23861..8eceb3c 100644
--- a/sys/geom/geom_kern.c
+++ b/sys/geom/geom_kern.c
@@ -68,9 +68,7 @@ g_up_procbody(void)
curthread->td_base_pri = PRIBIO;
for(;;) {
g_io_schedule_up(tp);
- mtx_lock(&Giant);
tsleep(&g_wait_up, PRIBIO, "g_up", hz/10);
- mtx_unlock(&Giant);
}
}
@@ -91,9 +89,7 @@ g_down_procbody(void)
curthread->td_base_pri = PRIBIO;
for(;;) {
g_io_schedule_down(tp);
- mtx_lock(&Giant);
tsleep(&g_wait_down, PRIBIO, "g_down", hz/10);
- mtx_unlock(&Giant);
}
}
@@ -112,9 +108,7 @@ g_event_procbody(void)
curthread->td_base_pri = PRIBIO;
for(;;) {
g_run_events();
- mtx_lock(&Giant);
tsleep(&g_wait_event, PRIBIO, "g_events", hz/10);
- mtx_unlock(&Giant);
}
}
OpenPOWER on IntegriCloud