Page MenuHomeFreeBSD

D35560.diff
No OneTemporary

D35560.diff

diff --git a/sys/net/altq/altq_rmclass.c b/sys/net/altq/altq_rmclass.c
--- a/sys/net/altq/altq_rmclass.c
+++ b/sys/net/altq/altq_rmclass.c
@@ -1449,13 +1449,8 @@
}
}
-#if (__FreeBSD_version > 300000)
-/* hzto() is removed from FreeBSD-3.0 */
-static int hzto(struct timeval *);
-
static int
-hzto(tv)
- struct timeval *tv;
+hzto(struct timeval *tv)
{
struct timeval t2;
@@ -1464,7 +1459,6 @@
t2.tv_usec = tv->tv_usec - t2.tv_usec;
return (tvtohz(&t2));
}
-#endif /* __FreeBSD_version > 300000 */
/*
* void
diff --git a/sys/net/altq/altq_subr.c b/sys/net/altq/altq_subr.c
--- a/sys/net/altq/altq_subr.c
+++ b/sys/net/altq/altq_subr.c
@@ -81,11 +81,7 @@
static void tbr_timeout(void *);
static struct mbuf *tbr_dequeue(struct ifaltq *, int);
static int tbr_timer = 0; /* token bucket regulator timer */
-#if !defined(__FreeBSD__) || (__FreeBSD_version < 600000)
-static struct callout tbr_callout = CALLOUT_INITIALIZER;
-#else
static struct callout tbr_callout;
-#endif
#ifdef ALTQ3_CLFIER_COMPAT
static int extract_ports4(struct mbuf *, struct ip *, struct flowinfo_in *);
@@ -883,7 +879,6 @@
extern u_int64_t cpu_tsc_freq;
#endif
-#if (__FreeBSD_version >= 700035)
/* Update TSC freq with the value indicated by the caller. */
static void
tsc_freq_changed(void *arg, const struct cf_level *level, int status)
@@ -892,7 +887,7 @@
if (status != 0)
return;
-#if (__FreeBSD_version >= 701102) && (defined(__amd64__) || defined(__i386__))
+#if defined(__amd64__) || defined(__i386__)
/* If TSC is P-state invariant, don't do anything. */
if (tsc_is_invariant)
return;
@@ -903,7 +898,6 @@
}
EVENTHANDLER_DEFINE(cpufreq_post_change, tsc_freq_changed, NULL,
EVENTHANDLER_PRI_LAST);
-#endif /* __FreeBSD_version >= 700035 */
static void
init_machclk_setup(void)
diff --git a/sys/net/altq/altq_var.h b/sys/net/altq/altq_var.h
--- a/sys/net/altq/altq_var.h
+++ b/sys/net/altq/altq_var.h
@@ -64,25 +64,15 @@
#endif
#define ACC_GET_HINDEX(handle) ((handle) >> 20)
-#if (__FreeBSD_version > 500000)
#define ACC_LOCK_INIT(ac) mtx_init(&(ac)->acc_mtx, "classifier", MTX_DEF)
#define ACC_LOCK_DESTROY(ac) mtx_destroy(&(ac)->acc_mtx)
#define ACC_LOCK(ac) mtx_lock(&(ac)->acc_mtx)
#define ACC_UNLOCK(ac) mtx_unlock(&(ac)->acc_mtx)
-#else
-#define ACC_LOCK_INIT(ac)
-#define ACC_LOCK_DESTROY(ac)
-#define ACC_LOCK(ac)
-#define ACC_UNLOCK(ac)
-#endif
struct acc_classifier {
u_int32_t acc_fbmask;
LIST_HEAD(filt, acc_filter) acc_filters[ACC_FILTER_TABLESIZE];
-
-#if (__FreeBSD_version > 500000)
struct mtx acc_mtx;
-#endif
};
/*

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 10, 5:12 AM (12 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15739679
Default Alt Text
D35560.diff (2 KB)

Event Timeline