Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
4dea3e07
Commit
4dea3e07
authored
Jul 14, 2015
by
Sebastian Lackner
Committed by
Alexandre Julliard
Jul 15, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vcomp: Implement omp_get_max_threads and omp_set_num_threads.
parent
a8f45dff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
7 deletions
+20
-7
main.c
dlls/vcomp/main.c
+20
-7
No files found.
dlls/vcomp/main.c
View file @
4dea3e07
...
...
@@ -29,6 +29,9 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
vcomp
);
static
int
vcomp_max_threads
;
static
int
vcomp_num_threads
;
int
CDECL
omp_get_dynamic
(
void
)
{
TRACE
(
"stub
\n
"
);
...
...
@@ -37,8 +40,8 @@ int CDECL omp_get_dynamic(void)
int
CDECL
omp_get_max_threads
(
void
)
{
TRACE
(
"
stub
\n
"
);
return
1
;
TRACE
(
"
()
\n
"
);
return
vcomp_max_threads
;
}
int
CDECL
omp_get_nested
(
void
)
...
...
@@ -83,7 +86,9 @@ void CDECL omp_set_nested(int nested)
void
CDECL
omp_set_num_threads
(
int
num_threads
)
{
TRACE
(
"(%d): stub
\n
"
,
num_threads
);
TRACE
(
"(%d)
\n
"
,
num_threads
);
if
(
num_threads
>=
1
)
vcomp_num_threads
=
num_threads
;
}
void
CDECL
_vcomp_barrier
(
void
)
...
...
@@ -107,17 +112,25 @@ void CDECL _vcomp_single_end(void)
TRACE
(
"stub
\n
"
);
}
BOOL
WINAPI
DllMain
(
HINSTANCE
hinstDLL
,
DWORD
fdwReason
,
LPVOID
lpvR
eserved
)
BOOL
WINAPI
DllMain
(
HINSTANCE
instance
,
DWORD
reason
,
LPVOID
r
eserved
)
{
TRACE
(
"(
0x%p, %d, %p)
\n
"
,
hinstDLL
,
fdwReason
,
lpvR
eserved
);
TRACE
(
"(
%p, %d, %p)
\n
"
,
instance
,
reason
,
r
eserved
);
switch
(
fdwR
eason
)
switch
(
r
eason
)
{
case
DLL_WINE_PREATTACH
:
return
FALSE
;
/* prefer native version */
case
DLL_PROCESS_ATTACH
:
DisableThreadLibraryCalls
(
hinstDLL
);
{
SYSTEM_INFO
sysinfo
;
DisableThreadLibraryCalls
(
instance
);
GetSystemInfo
(
&
sysinfo
);
vcomp_max_threads
=
sysinfo
.
dwNumberOfProcessors
;
vcomp_num_threads
=
sysinfo
.
dwNumberOfProcessors
;
break
;
}
}
return
TRUE
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment