Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50041 Signed-off-by: Andrey Gusev andrey.goosev@gmail.com --- dlls/vcomp/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/vcomp/main.c b/dlls/vcomp/main.c index 3c6d48d41cc..8e7fa10d570 100644 --- a/dlls/vcomp/main.c +++ b/dlls/vcomp/main.c @@ -986,8 +986,8 @@ int CDECL omp_get_nested(void)
int CDECL omp_get_num_procs(void) { - TRACE("stub\n"); - return 1; + TRACE("()\n"); + return sizeof(LOGICAL_PROCESSOR_RELATIONSHIP); }
int CDECL omp_get_num_threads(void)
On 10/23/20 21:01, Andrey Gusev wrote:
int CDECL omp_get_num_procs(void) {
- TRACE("stub\n");
- return 1;
- TRACE("()\n");
- return sizeof(LOGICAL_PROCESSOR_RELATIONSHIP);
}
int CDECL omp_get_num_threads(void)
I guess you'd want the number of processors queried like vcomp_max_threads global variable in DllMain() [1]. omp_get_num_procs() is not the same as omp_get_max_threads() though as it is possible to configure maximum number of threads to use in Openmp [2]. The number of processors is not what Openmp controls, it is the number of processors currently available in the system (which can still change during runtime as processors can be hotplugged, stopped or resumed). I guess a trivial test to vcomp/tests/vcomp.c comparing omp_get_num_procs() with the number of CPUs requested by GetSystemInfo could be helpful.