[sgen] Use regular, non-safe LLS foreach macro.
authorAlex Rønne Petersen <alexrp@xamarin.com>
Wed, 2 Mar 2016 16:30:08 +0000 (17:30 +0100)
committerAlex Rønne Petersen <alexrp@xamarin.com>
Wed, 2 Mar 2016 16:30:08 +0000 (17:30 +0100)
commitb8ebdb1e7767932b8776f2e12d5c38df7abbce11
tree54508043ae836fc9072a4cd3862791a6fc409ec9
parent4d673f2793d96f3ce8e6ab1865a8428aa68a6bb3
[sgen] Use regular, non-safe LLS foreach macro.

As it turns out, all these uses of FOREACH_THREAD_SAFE were inside regions
where the suspend lock is held. This effectively meant that no modifications
to the thread list could actually happen while the foreach was executing. Since
the guarantees provided by FOREACH_THREAD_SAFE are not needed in any of these
cases, switch to FOREACH_THREAD. The latter macro also happens to be much more
lightweight, so this should result in an overall (small) performance gain.
mono/metadata/sgen-os-mach.c
mono/metadata/sgen-os-posix.c
mono/metadata/sgen-os-win32.c
mono/metadata/sgen-stw.c