]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r285715:
authored <ed@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 17 Aug 2015 12:51:46 +0000 (12:51 +0000)
committered <ed@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 17 Aug 2015 12:51:46 +0000 (12:51 +0000)
commit9011d160a50b0dfbe9e50c4f84595c6981f81818
tree7836b9cb3f95fd1b60c6d1a2643dd55032438521
parentd7a8d1b49f0d336602918b66d60b1eb06665a8ec
MFC r285715:

  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().

git-svn-id: svn://svn.freebsd.org/base/stable/10@286843 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/cddl/compat/opensolaris/sys/proc.h
sys/kern/kern_thr.c
sys/sys/proc.h