Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > muc.lists.netbsd.source-changes > #156170
| From | Thomas Klausner <wiz@netbsd.org> |
|---|---|
| Newsgroups | muc.lists.netbsd.source-changes |
| Subject | Re: CVS commit: src/sys/sys |
| Date | 2026-05-28 12:26 +0200 |
| Organization | Newsgate at muc.de e.V. |
| Message-ID | <ahgYKbCr2vytm1_D@exadelic.gatalith.at> (permalink) |
| References | <20260511020736.901F6FA2B@cvs.NetBSD.org> |
I think this broke the compilation of sysutils/lsof, which now says:
--- dnode.o ---
In file included from machine.h:43,
from lsof.h:41,
from dnode.c:39:
dnode.c: In function 'getmemsz':
dnode.c:94:37: error: 'PAGE_SHIFT' undeclared (first use in this function); did you mean 'PGSHIFT'?
94 | Lf->sz = (SZOFFTYPE)ctob(vm.vm_tsize + vm.vm_dsize
| ^~~~
dnode.c:94:37: note: each undeclared identifier is reported only once for each function it appears in
Thomas
On Mon, May 11, 2026 at 02:07:36AM +0100, Jason R Thorpe wrote:
> Module Name: src
> Committed By: thorpej
> Date: Mon May 11 02:07:36 UTC 2026
>
> Modified Files:
> src/sys/sys: param.h
>
> Log Message:
> PGSHIFT -> PAGE_SHIFT
> PGOFSET -> PAGE_MASK
> NBPG -> PAGE_SIZE
>
>
> To generate a diff of this commit:
> cvs rdiff -u -r1.744 -r1.745 src/sys/sys/param.h
>
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
>
> Modified files:
>
> Index: src/sys/sys/param.h
> diff -u src/sys/sys/param.h:1.744 src/sys/sys/param.h:1.745
> --- src/sys/sys/param.h:1.744 Sun May 3 16:02:37 2026
> +++ src/sys/sys/param.h Mon May 11 02:07:36 2026
> @@ -1,4 +1,4 @@
> -/* $NetBSD: param.h,v 1.744 2026/05/03 16:02:37 thorpej Exp $ */
> +/* $NetBSD: param.h,v 1.745 2026/05/11 02:07:36 thorpej Exp $ */
>
> /*-
> * Copyright (c) 1982, 1986, 1989, 1993
> @@ -201,12 +201,12 @@
> #endif
>
> /* pages ("clicks") to disk blocks */
> -#define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT))
> -#define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT))
> +#define ctod(x) ((x) << (PAGE_SHIFT - DEV_BSHIFT))
> +#define dtoc(x) ((x) >> (PAGE_SHIFT - DEV_BSHIFT))
>
> /* bytes to pages */
> -#define ctob(x) ((x) << PGSHIFT)
> -#define btoc(x) (((x) + PGOFSET) >> PGSHIFT)
> +#define ctob(x) ((x) << PAGE_SHIFT)
> +#define btoc(x) (((x) + PAGE_MASK) >> PAGE_SHIFT)
>
> /* bytes to disk blocks */
> #define dbtob(x) ((x) << DEV_BSHIFT)
> @@ -465,7 +465,7 @@
> * always allocate and free physical memory; requests for these
> * size allocations should be done infrequently as they will be slow.
> *
> - * Constraints: NBPG <= MAXALLOCSAVE <= 2 ** (MINBUCKET + 14), and
> + * Constraints: PAGE_SIZE <= MAXALLOCSAVE <= 2 ** (MINBUCKET + 14), and
> * MAXALLOCSAVE must be a power of two.
> */
> #ifdef _LP64
> @@ -473,7 +473,7 @@
> #else
> #define MINBUCKET 4 /* 4 => min allocation of 16 bytes */
> #endif
> -#define MAXALLOCSAVE (2 * NBPG)
> +#define MAXALLOCSAVE (2 * PAGE_SIZE)
>
> /*
> * Scale factor for scaled integers used to count %cpu time and load avgs.
>
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Back to muc.lists.netbsd.source-changes | Previous | Next | Find similar | Unroll thread
Re: CVS commit: src/sys/sys Thomas Klausner <wiz@netbsd.org> - 2026-05-28 12:26 +0200
csiph-web