]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r313941:
authorhselasky <hselasky@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 14 Mar 2017 15:53:24 +0000 (15:53 +0000)
committerhselasky <hselasky@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 14 Mar 2017 15:53:24 +0000 (15:53 +0000)
commita9258b482b785911dcd7d1725e0d7cb1b1503042
tree0569772b9b78d1db7fde84b3e630d0a3a5e8f60f
parent2eedcf968e17793a088850eac7fece43219f6653
MFC r313941:

Make sure the thread constructor and destructor eventhandlers are
called for all threads belonging to a procedure. Currently the first
thread in a procedure is kept around as an optimisation step and is
never freed. Because the first thread in a procedure is never freed
nor allocated, its destructor and constructor callbacks are never
called which means per thread structures allocated by dtrace and the
Linux emulation layers for example, might be present for threads which
don't need these structures.

This patch adds a thread construction and destruction call for the
first thread in a procedure.

Tested: dtrace, linux emulation
Reviewed by: kib @
Sponsored by: Mellanox Technologies

git-svn-id: svn://svn.freebsd.org/base/stable/8@315262 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/kern/kern_proc.c