freebsd-skq/sys/cddl
Ed Schouten 5a170c1b0e Add an API for easily creating userspace threads in kernelspace.
This change refactors the existing create_thread() function to be more
generic. It replaces almost all of its arguments by a callback that can
be used to extract the thread ID and copy it out to the right place, but
also to perform additional initialization steps, such as setting the
trapframe. This also makes the difference between thr_new() and
thr_create() more clear in my opinion.

This function is going to be used by the CloudABI compatibility layer.

It looks like the OpenSolaris compatibility framework already provides a
function called thread_create(). Rename this function to
do_thread_create() and use a macro to deal with the namespacing
conflict. A similar approach is already used for thread_exit().

MFC after:	1 month
2015-07-20 10:20:04 +00:00
..
boot/zfs MFV r274273: 2014-11-10 08:20:21 +00:00
compat/opensolaris Add an API for easily creating userspace threads in kernelspace. 2015-07-20 10:20:04 +00:00
contrib/opensolaris vfs: implement v_holdcnt/v_usecount manipulation using atomic ops 2015-07-16 13:57:05 +00:00
dev Implement the lockstat provider using SDT(9) instead of the custom provider 2015-07-19 22:14:09 +00:00