summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-03-12 14:44:36 +0100
committerMichael Stahl <mstahl@redhat.com>2015-03-12 17:28:49 +0100
commit279b6e4b75e74c743ca018435c1d7644c71b9e0c (patch)
treef6967c94ea14849794e06aa78bdf1a2d2ed88683 /sal
parentaa9413d9b44e7d38d13e7bb1605343cb1de367d3 (diff)
sal: add comment re: V718 'CreateThread' should not be called from 'DllMain'
Change-Id: I6e444e6c3dd4f5e158fe9b649b97ccb5ca32c3a7
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/w32/dllentry.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sal/osl/w32/dllentry.c b/sal/osl/w32/dllentry.c
index e472c1f1e2e8..1a113b3c5da9 100644
--- a/sal/osl/w32/dllentry.c
+++ b/sal/osl/w32/dllentry.c
@@ -306,6 +306,12 @@ BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
// No error check, it works or it does not
// Thread should only be started for headless mode, see desktop/win32/source/officeloader.cxx
CreateThread( NULL, 0, ParentMonitorThreadProc, (LPVOID)dwParentProcessId, 0, &dwThreadId );
+ // Note: calling CreateThread in DllMain is discouraged
+ // but this is only done in the headless mode and in
+ // that case no other threads should be running at startup
+ // when sal3.dll is loaded; also there is no
+ // synchronization with the spawned thread, so there
+ // does not appear to be a real risk of deadlock here
}
}