aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2023-06-05 20:31:44 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2023-06-05 20:31:44 +0300
commit67831847a3fb211784e1d143d472fd86c0e5fab8 (patch)
treec3eefca9b8efeb1b3bc1c2a71016f23840fd09ad /include
parentabb11558ee2a2943023f2e9727976a8adace3bc8 (diff)
downloadkmi-67831847a3fb211784e1d143d472fd86c0e5fab8.tar.gz
kmi-67831847a3fb211784e1d143d472fd86c0e5fab8.zip
give compiler more room to optimize rpc invocation
+ Try to write arguments to memory as fast as possible to free up some registers that the compiler can then play with. Qemu runs ~1 700 000 rpc's per second, visionfive2 @1GHz (I think) ~800 000.
Diffstat (limited to 'include')
-rw-r--r--include/kmi/assert.h2
-rw-r--r--include/kmi/tcb.h23
2 files changed, 1 insertions, 24 deletions
diff --git a/include/kmi/assert.h b/include/kmi/assert.h
index 89e809b..69eb9ce 100644
--- a/include/kmi/assert.h
+++ b/include/kmi/assert.h
@@ -22,7 +22,7 @@
#include <kmi/utils.h>
/** \todo should this exit or do something explosive like that? */
-#if !defined(DNDEBUG)
+#if defined(DEBUG)
/**
* The kernel is in an irrepairable state, just give up.
diff --git a/include/kmi/tcb.h b/include/kmi/tcb.h
index 420c432..b98b2cc 100644
--- a/include/kmi/tcb.h
+++ b/include/kmi/tcb.h
@@ -391,27 +391,4 @@ void set_return(struct tcb *t, vm_t r);
*/
bool running(struct tcb *t);
-/**
- * Save thread context for rpc call.
- * Assumes t->rpc is pointing to the correct virtual memory.
- *
- * @param t Thread whose context to save.
- */
-void enter_rpc(struct tcb *t);
-
-/**
- * Load thread context from rpc call.
- *
- * @param t Thread whose context to restore.
- */
-void leave_rpc(struct tcb *t);
-
-/**
- * Check that we have enough rpc stack.
- *
- * @param t Thread whose rpc stack to check.
- * @return \ref true if we have enough, \ref false otherwise.
- */
-bool enough_rpc_stack(struct tcb *t);
-
#endif /* KMI_TCB_H */