|
CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
|
For C++ programmers, we provide some more user-friendly wrappers. More...
Namespaces | |
| namespace | detail |
| Implementation details, should not be used outside of this header. | |
Functions | |
| template<typename T> | |
| int | async (T &&lambda) |
| Asynchronously invoke a lambda. | |
For C++ programmers, we provide some more user-friendly wrappers.
| int thread_pool::async | ( | T && | lambda | ) |
Asynchronously invoke a lambda.
This moves the lambda to the heap and passes it to the thread pool's queue. If the lambda copies any stack objects by reference then the copy will fail.
Returns 0 on success, or compartment-call failures (ENOTENOUGHSTACK, ENOTENOUGHTRUSTEDSTACK) if the thread pool cannot be invoked.
Definition at line 160 of file thread_pool.h.
References thread_pool::detail::sealing_key_for_type(), thread_pool_async(), token_sealed_unsealed_alloc(), UnlimitedTimeout, thread_pool::detail::wrap_callback_function(), and thread_pool::detail::wrap_callback_lambda().