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
bbc03d51
Commit
bbc03d51
authored
May 04, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Use the prefix architecture instead of the server one to check for WoW processes.
parent
58791c9a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
9 deletions
+10
-9
process.h
server/process.h
+3
-0
registry.c
server/registry.c
+7
-0
thread.c
server/thread.c
+0
-8
thread.h
server/thread.h
+0
-1
No files found.
server/process.h
View file @
bbc03d51
...
...
@@ -92,6 +92,9 @@ struct process_snapshot
int
handles
;
/* number of handles */
};
#define CPU_FLAG(cpu) (1 << (cpu))
#define CPU_64BIT_MASK CPU_FLAG(CPU_x86_64)
/* process functions */
extern
unsigned
int
alloc_ptid
(
void
*
ptr
);
...
...
server/registry.c
View file @
bbc03d51
...
...
@@ -43,6 +43,7 @@
#include "file.h"
#include "handle.h"
#include "request.h"
#include "process.h"
#include "unicode.h"
#include "security.h"
...
...
@@ -1873,6 +1874,12 @@ void flush_registry(void)
if
(
fchdir
(
server_dir_fd
)
==
-
1
)
fatal_perror
(
"chdir to server dir"
);
}
/* determine if the thread is wow64 (32-bit client running on 64-bit prefix) */
static
int
is_wow64_thread
(
struct
thread
*
thread
)
{
return
(
prefix_type
==
PREFIX_64BIT
&&
!
(
CPU_FLAG
(
thread
->
process
->
cpu
)
&
CPU_64BIT_MASK
));
}
/* create a registry key */
DECL_HANDLER
(
create_key
)
...
...
server/thread.c
View file @
bbc03d51
...
...
@@ -53,7 +53,6 @@
#include "security.h"
#define CPU_FLAG(cpu) (1 << (cpu))
#ifdef __i386__
static
const
unsigned
int
supported_cpus
=
CPU_FLAG
(
CPU_x86
);
#elif defined(__x86_64__)
...
...
@@ -67,7 +66,6 @@ static const unsigned int supported_cpus = CPU_FLAG(CPU_SPARC);
#else
#error Unsupported CPU
#endif
#define CPU_64BIT_MASK CPU_FLAG(CPU_x86_64)
/* thread queues */
...
...
@@ -409,12 +407,6 @@ struct thread *get_thread_from_pid( int pid )
return
NULL
;
}
/* determine if the thread is wow64 (32-bit client running on 64-bit server) */
int
is_wow64_thread
(
struct
thread
*
thread
)
{
return
(
supported_cpus
&
CPU_64BIT_MASK
)
&&
!
(
CPU_FLAG
(
thread
->
process
->
cpu
)
&
CPU_64BIT_MASK
);
}
int
set_thread_affinity
(
struct
thread
*
thread
,
affinity_t
affinity
)
{
int
ret
=
0
;
...
...
server/thread.h
View file @
bbc03d51
...
...
@@ -118,7 +118,6 @@ extern int thread_add_inflight_fd( struct thread *thread, int client, int server
extern
int
thread_get_inflight_fd
(
struct
thread
*
thread
,
int
client
);
extern
struct
thread_snapshot
*
thread_snap
(
int
*
count
);
extern
struct
token
*
thread_get_impersonation_token
(
struct
thread
*
thread
);
extern
int
is_wow64_thread
(
struct
thread
*
thread
);
extern
int
set_thread_affinity
(
struct
thread
*
thread
,
affinity_t
affinity
);
/* ptrace functions */
...
...
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