Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Change obsolete CBSIZE constant (48), to a power of two ...
details: https://anonhg.NetBSD.org/src/rev/5b05837396b3
branches: trunk
changeset: 769796:5b05837396b3
user: christos <christos%NetBSD.org@localhost>
date: Fri Sep 23 15:29:08 2011 +0000
description:
Change obsolete CBSIZE constant (48), to a power of two constant (64) that
is close enough to match the original assumptions.
diffstat:
sys/kern/tty.c | 6 +++---
sys/net/if_sl.c | 6 +++---
sys/net/if_strip.c | 6 +++---
sys/sys/tty.h | 7 ++++---
4 files changed, 13 insertions(+), 12 deletions(-)
diffs (104 lines):
diff -r 1d9124e30343 -r 5b05837396b3 sys/kern/tty.c
--- a/sys/kern/tty.c Fri Sep 23 15:24:35 2011 +0000
+++ b/sys/kern/tty.c Fri Sep 23 15:29:08 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tty.c,v 1.246 2011/07/26 13:14:18 yamt Exp $ */
+/* $NetBSD: tty.c,v 1.247 2011/09/23 15:29:08 christos Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.246 2011/07/26 13:14:18 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.247 2011/09/23 15:29:08 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -2350,7 +2350,7 @@
tp->t_lowat = x = CLAMP(cps / 2, TTMAXLOWAT, TTMINLOWAT);
x += cps;
x = CLAMP(x, TTMAXHIWAT, TTMINHIWAT);
- tp->t_hiwat = roundup(x, CBSIZE);
+ tp->t_hiwat = roundup(x, TTROUND);
#undef CLAMP
}
diff -r 1d9124e30343 -r 5b05837396b3 sys/net/if_sl.c
--- a/sys/net/if_sl.c Fri Sep 23 15:24:35 2011 +0000
+++ b/sys/net/if_sl.c Fri Sep 23 15:29:08 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_sl.c,v 1.117 2010/04/05 07:22:23 joerg Exp $ */
+/* $NetBSD: if_sl.c,v 1.118 2011/09/23 15:29:09 christos Exp $ */
/*
* Copyright (c) 1987, 1989, 1992, 1993
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_sl.c,v 1.117 2010/04/05 07:22:23 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_sl.c,v 1.118 2011/09/23 15:29:09 christos Exp $");
#include "opt_inet.h"
@@ -154,7 +154,7 @@
#if (SLMTU < 3)
#error SLMTU way too small.
#endif
-#define SLIP_HIWAT roundup(50,CBSIZE)
+#define SLIP_HIWAT roundup(50, TTROUND)
#ifndef __NetBSD__ /* XXX - cgd */
#define CLISTRESERVE 1024 /* Can't let clists get too low */
#endif /* !__NetBSD__ */
diff -r 1d9124e30343 -r 5b05837396b3 sys/net/if_strip.c
--- a/sys/net/if_strip.c Fri Sep 23 15:24:35 2011 +0000
+++ b/sys/net/if_strip.c Fri Sep 23 15:29:08 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_strip.c,v 1.95 2010/04/05 07:22:24 joerg Exp $ */
+/* $NetBSD: if_strip.c,v 1.96 2011/09/23 15:29:09 christos Exp $ */
/* from: NetBSD: if_sl.c,v 1.38 1996/02/13 22:00:23 christos Exp $ */
/*
@@ -87,7 +87,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_strip.c,v 1.95 2010/04/05 07:22:24 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_strip.c,v 1.96 2011/09/23 15:29:09 christos Exp $");
#include "opt_inet.h"
@@ -186,7 +186,7 @@
#define STRIP_MTU_ONWIRE (SLMTU + 20 + STRIP_HDRLEN) /* (2*SLMTU+2 in sl.c */
-#define SLIP_HIWAT roundup(50,CBSIZE)
+#define SLIP_HIWAT roundup(50, TTROUND)
/* This is a NetBSD-1.0 or later kernel. */
#define CCOUNT(q) ((q)->c_cc)
diff -r 1d9124e30343 -r 5b05837396b3 sys/sys/tty.h
--- a/sys/sys/tty.h Fri Sep 23 15:24:35 2011 +0000
+++ b/sys/sys/tty.h Fri Sep 23 15:29:08 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tty.h,v 1.88 2011/07/26 13:14:17 yamt Exp $ */
+/* $NetBSD: tty.h,v 1.89 2011/09/23 15:29:09 christos Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -165,10 +165,11 @@
#define TTYHOG 1024
#ifdef _KERNEL
-#define TTMAXHIWAT roundup(2048, CBSIZE)
-#define TTMINHIWAT roundup(100, CBSIZE)
+#define TTMAXHIWAT roundup(2048, TTROUND)
+#define TTMINHIWAT roundup(100, TTROUND)
#define TTMAXLOWAT 256
#define TTMINLOWAT 32
+#define TTROUND 64
#endif /* _KERNEL */
/* These flags are kept in t_state. */
Home |
Main Index |
Thread Index |
Old Index