Skip to content

Commit

Permalink
buf.h: Fix declaration of unmapped_buf
Browse files Browse the repository at this point in the history
For architectures with a small-data area, the __read_mostly section must
present at the object declaration.

(emaste note: This does not appear to have an affect within FreeBSD, but
may be needed by downstream projects that handle __read_mostly /
__section(".data.read_mostly") differently.)

Pull Request:	#608
  • Loading branch information
sebhub authored and emaste committed Aug 16, 2022
1 parent 01f11ee commit ede6c6c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sys/sys/buf.h
Expand Up @@ -522,7 +522,8 @@ extern int bdwriteskip;
extern int dirtybufferflushes;
extern int altbufferflushes;
extern int nswbuf; /* Number of swap I/O buffer headers. */
extern caddr_t unmapped_buf; /* Data address for unmapped buffers. */
extern caddr_t __read_mostly unmapped_buf; /* Data address for unmapped
buffers. */

static inline int
buf_mapped(struct buf *bp)
Expand Down

0 comments on commit ede6c6c

Please sign in to comment.