]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r313941:
authorhselasky <hselasky@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 14 Mar 2017 15:50:36 +0000 (15:50 +0000)
committerhselasky <hselasky@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 14 Mar 2017 15:50:36 +0000 (15:50 +0000)
commit71d54a853d1148ea1e6f1b222606ee0763bfce30
treec855e6211fb82b351afba44a24d9482f3cef0b3f
parent67c8461c24cc6f1922c8432b03d2d372344806aa
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/10@315260 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/kern/kern_proc.c