summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2015-07-20 10:20:04 +0000
committered <ed@FreeBSD.org>2015-07-20 10:20:04 +0000
commit7f556435bf73721091bfbf3ea42e18a1c5f86009 (patch)
tree1b8e66c1e38d8272eb80fdd5d182530870775131 /sys/compat
parent67557271af7ed3c8e0ccd63ee8f55dcd5301ef08 (diff)
downloadFreeBSD-src-7f556435bf73721091bfbf3ea42e18a1c5f86009.zip
FreeBSD-src-7f556435bf73721091bfbf3ea42e18a1c5f86009.tar.gz
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
Diffstat (limited to 'sys/compat')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud