aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/sf_buf.h
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2004-03-16 19:04:28 +0000
committerAlan Cox <alc@FreeBSD.org>2004-03-16 19:04:28 +0000
commit90ecfebd8287b0c59fe80050d3026f7e94db5a3b (patch)
tree23b7ae48f580ace96e1510d279da96896036cc35 /sys/sys/sf_buf.h
parent27de234992dc74bdb8edec2114124454fc5ddc4c (diff)
downloadsrc-90ecfebd8287b0c59fe80050d3026f7e94db5a3b.tar.gz
src-90ecfebd8287b0c59fe80050d3026f7e94db5a3b.zip
Refactor the existing machine-dependent sf_buf_free() into a machine-
dependent function by the same name and a machine-independent function, sf_buf_mext(). Aside from the virtue of making more of the code machine- independent, this change also makes the interface more logical. Before, sf_buf_free() did more than simply undo an sf_buf_alloc(); it also unwired and if necessary freed the page. That is now the purpose of sf_buf_mext(). Thus, sf_buf_alloc() and sf_buf_free() can now be used as a general-purpose emphemeral map cache.
Notes
Notes: svn path=/head/; revision=127086
Diffstat (limited to 'sys/sys/sf_buf.h')
-rw-r--r--sys/sys/sf_buf.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/sys/sf_buf.h b/sys/sys/sf_buf.h
index f0655d2fdaf1..e179df99d105 100644
--- a/sys/sys/sf_buf.h
+++ b/sys/sys/sf_buf.h
@@ -39,6 +39,7 @@ extern int nsfbufsused; /* Number of sendfile(2) bufs in use */
struct sf_buf *
sf_buf_alloc(struct vm_page *m);
-void sf_buf_free(void *addr, void *args);
+void sf_buf_free(struct sf_buf *sf);
+void sf_buf_mext(void *addr, void *args);
#endif /* !_SYS_SF_BUF_H_ */