From 271a663d2f098f3f665cab6da2e13b265a7eab93 Mon Sep 17 00:00:00 2001 From: Ashod Nakashian Date: Mon, 25 Dec 2017 15:02:41 -0500 Subject: rtl: support start/stop threads around pre-init This is necessary to avoid having extra threads while forking. After forking, the second stage of pre-init is started and so we start the stopped rtl threads. The comment for rtl_alloc_preInit_phase_t has more details. Change-Id: I1a3f7be74d4b04d0b2fc4a72b02124c2faa3c047 Reviewed-on: https://gerrit.libreoffice.org/47060 Tested-by: Jenkins Reviewed-by: Ashod Nakashian --- sal/qa/rtl/alloc/rtl_alloc.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sal/qa') diff --git a/sal/qa/rtl/alloc/rtl_alloc.cxx b/sal/qa/rtl/alloc/rtl_alloc.cxx index 0e9b7c0f47a8..37c7b41eb338 100644 --- a/sal/qa/rtl/alloc/rtl_alloc.cxx +++ b/sal/qa/rtl/alloc/rtl_alloc.cxx @@ -158,7 +158,7 @@ public: const char *sample = "Hello World"; std::vector aStrings; - rtl_alloc_preInit(true); + rtl_alloc_preInit(rtlAllocPreInitStart); OUString aFoo("foo"); @@ -183,7 +183,7 @@ public: } // should static-ize all the strings. - rtl_alloc_preInit(false); + rtl_alloc_preInit(rtlAllocPreInitEnd); for (size_t i = 0; i < aStrings.size(); ++i) CPPUNIT_ASSERT_MESSAGE( "static after.", (aStrings[i].pData->refCount & SAL_STRING_STATIC_FLAG) ); -- cgit