summaryrefslogtreecommitdiffstats
path: root/sys/sys/sysent.h
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2012-06-22 06:39:28 +0000
committerkib <kib@FreeBSD.org>2012-06-22 06:39:28 +0000
commit4109c3e1ac5d4621c6f3fb66d64903573a353eca (patch)
tree9fbaec8ffd984ed4fb16dc0fb59eb241295239ac /sys/sys/sysent.h
parentd98ad62d7e31d7be275f07d4af7eb4d5d40243f8 (diff)
downloadFreeBSD-src-4109c3e1ac5d4621c6f3fb66d64903573a353eca.zip
FreeBSD-src-4109c3e1ac5d4621c6f3fb66d64903573a353eca.tar.gz
Enchance the shared page chunk allocator.
Do not rely on the busy state of the page from which we allocate the chunk, to protect allocator state. Use statically allocated sx lock instead. Provide more flexible KPI. In particular, allow to allocate chunk without providing initial data, and allow writes into existing allocation. Allow to get an sf buf which temporary maps the chunk, to allow sequential updates to shared page content without unmapping in between. Reviewed by: jhb Tested by: flo MFC after: 1 month
Diffstat (limited to 'sys/sys/sysent.h')
-rw-r--r--sys/sys/sysent.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h
index d916cf1..9dd5c1c 100644
--- a/sys/sys/sysent.h
+++ b/sys/sys/sysent.h
@@ -256,8 +256,13 @@ int lkmressys(struct thread *, struct nosys_args *);
int syscall_thread_enter(struct thread *td, struct sysent *se);
void syscall_thread_exit(struct thread *td, struct sysent *se);
-int shared_page_fill(int size, int align, const char *data);
+struct sf_buf;
+int shared_page_alloc(int size, int align);
+int shared_page_fill(int size, int align, const void *data);
+void shared_page_write(int base, int size, const void *data);
void exec_sysvec_init(void *param);
+struct sf_buf *shared_page_write_start(int base);
+void shared_page_write_end(struct sf_buf *sf);
#define INIT_SYSENTVEC(name, sv) \
SYSINIT(name, SI_SUB_EXEC, SI_ORDER_ANY, \
OpenPOWER on IntegriCloud