aboutsummaryrefslogtreecommitdiff
path: root/sys/sys
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2021-01-12 16:05:27 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2021-01-13 02:27:03 +0000
commit530b699a62ad0f1e5718825d60ddb1ec9b214489 (patch)
tree584bb20248937af08fbd58f2a2388dbc2403bed8 /sys/sys
parent4faa375cdd4e36d3a5b7fc46ee9dd8079a5e26f7 (diff)
downloadsrc-530b699a62ad0f1e5718825d60ddb1ec9b214489.tar.gz
src-530b699a62ad0f1e5718825d60ddb1ec9b214489.zip
fd: add finstall_refed
Can be used to consume an already existing reference and consequently avoid atomic ops.
Diffstat (limited to 'sys/sys')
-rw-r--r--sys/sys/filedesc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/sys/filedesc.h b/sys/sys/filedesc.h
index 132aa6c1de03..f0cae3ed6911 100644
--- a/sys/sys/filedesc.h
+++ b/sys/sys/filedesc.h
@@ -234,6 +234,8 @@ void _finstall(struct filedesc *fdp, struct file *fp, int fd, int flags,
struct filecaps *fcaps);
int finstall(struct thread *td, struct file *fp, int *resultfd, int flags,
struct filecaps *fcaps);
+int finstall_refed(struct thread *td, struct file *fp, int *resultfd, int flags,
+ struct filecaps *fcaps);
int fdalloc(struct thread *td, int minfd, int *result);
int fdallocn(struct thread *td, int minfd, int *fds, int n);
int fdcheckstd(struct thread *td);