vcomp: Add stub for _vcomp_fork
André Hentschel
nerv at dawncrow.de
Mon Feb 20 11:00:52 CST 2012
I know it's a stub, but i have some good explanation for including it even in code-freeze.
_vcomp_fork is used to create a new process which starts at a compiler generated managment code.
This managment code then uses functions like _vcomp_for_static_end and _vcomp_for_static_simple_init, that's why we don't need stubs for these with that patch.
What happens if _vcomp_fork doesn't create a new process?
let's assume OpenMP code like:
#pragma omp parallel sections
{
#pragma omp section
{
function_A();
} /* omp section */
#pragma omp section
{
function_B();
} /* omp section */
} /* omp parallel sections */
Here with real OpenMP support, function_A and function_B would "run on two Cores at the same time", without compile-time OpenMP support the pragmas would be ignored and function_B would simply run after function_A.
And that's what happens with a _vcomp_fork doing nothing: function_B simply runs after function_A.
This works for e.g.:
Enblend/Enfuse (http://enblend.sourceforge.net/)
Bully: Scholarship Edition
It doesn't work for:
Risen, because it needs much more functions: http://bugs.winehq.org/show_bug.cgi?id=26688#c3
See also:
http://bugs.winehq.org/show_bug.cgi?id=26688
http://bugs.winehq.org/show_bug.cgi?id=26688#c5
http://bugs.winehq.org/show_bug.cgi?id=26688#c12
---
dlls/vcomp/main.c | 5 +++++
dlls/vcomp/vcomp.spec | 2 +-
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/dlls/vcomp/main.c b/dlls/vcomp/main.c
index 0a3c4f5..5b8418c 100644
--- a/dlls/vcomp/main.c
+++ b/dlls/vcomp/main.c
@@ -46,3 +46,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
return TRUE;
}
+
+void WINAPIV _vcomp_fork(DWORD arg1, DWORD varargs, void* arg3, ...)
+{
+ FIXME("(%u, %u, %p, ...): stub\n", arg1, varargs, arg3);
+}
diff --git a/dlls/vcomp/vcomp.spec b/dlls/vcomp/vcomp.spec
index cd5a964..22b1c3c 100644
--- a/dlls/vcomp/vcomp.spec
+++ b/dlls/vcomp/vcomp.spec
@@ -64,7 +64,7 @@
@ stub _vcomp_for_static_init_i8
@ stub _vcomp_for_static_simple_init
@ stub _vcomp_for_static_simple_init_i8
-@ stub _vcomp_fork
+@ varargs _vcomp_fork(long long ptr)
@ stub _vcomp_get_thread_num
@ stub _vcomp_leave_critsect
@ stub _vcomp_master_barrier
--
Best Regards, André Hentschel
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Nachrichtenteil als Anhang
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20120220/4650e6a1/attachment-0001.ksh>
More information about the wine-patches
mailing list