diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/kmi/syscalls.h | 9 | ||||
| -rw-r--r-- | include/kmi/tcb.h | 5 |
2 files changed, 14 insertions, 0 deletions
diff --git a/include/kmi/syscalls.h b/include/kmi/syscalls.h index 5079d74..4319812 100644 --- a/include/kmi/syscalls.h +++ b/include/kmi/syscalls.h @@ -258,6 +258,15 @@ enum conf_param { * \c R */ CONF_PAGE_SIZE, + + /** + * Maximum number of threads active at the same time. + * Can be used by userspace to build a pretty fast hashmaps of thread + * IDs to whatever, see \ref get_tcb(). + * Guaranteed to be some power of 2. + * \c R + */ + CONF_MAX_THREADS, }; /** Capabilities of process. */ diff --git a/include/kmi/tcb.h b/include/kmi/tcb.h index a6522f8..4214cb0 100644 --- a/include/kmi/tcb.h +++ b/include/kmi/tcb.h @@ -199,6 +199,11 @@ struct tcb { void init_tcbs(); /** + * @return Maximum number of threads active at the same time. + */ +size_t max_tcbs(); + +/** * Destroy thread control subsystem. */ void destroy_tcbs(); |
