]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add a way to distinguish between forking and thread creation in schedtail.
authorEd Schouten <ed@FreeBSD.org>
Thu, 22 Oct 2015 09:33:34 +0000 (09:33 +0000)
committerEd Schouten <ed@FreeBSD.org>
Thu, 22 Oct 2015 09:33:34 +0000 (09:33 +0000)
commitaff5735784df44945af1de1cf35b5df0779bb097
tree8d088ef4526d83dbcb1235ccc1a30a87606ea4b2
parentb78ef4bd86f5fbc328996350735aa6586cd1bc35
Add a way to distinguish between forking and thread creation in schedtail.

For CloudABI we need to initialize the registers of new threads
differently based on whether the thread got created through a fork or
through simple thread creation.

Add a flag, TDP_FORKING, that is set by do_fork() and cleared by
fork_exit(). This can be tested against in schedtail.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D3973
sys/kern/kern_fork.c
sys/kern/subr_syscall.c
sys/sys/proc.h