Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
52f692fb
Commit
52f692fb
authored
Sep 18, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved the wine server client-side support to dlls/ntdll. Removed a
couple of unnecessary functions.
parent
ba713161
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
50 deletions
+30
-50
process.c
dlls/kernel/process.c
+8
-2
thread.c
dlls/kernel/thread.c
+1
-1
Makefile.in
dlls/ntdll/Makefile.in
+1
-1
ntdll.spec
dlls/ntdll/ntdll.spec
+1
-0
server.c
dlls/ntdll/server.c
+8
-38
server.h
include/wine/server.h
+1
-4
registry.c
misc/registry.c
+10
-4
No files found.
dlls/kernel/process.c
View file @
52f692fb
...
@@ -306,7 +306,7 @@ static BOOL process_init( char *argv[] )
...
@@ -306,7 +306,7 @@ static BOOL process_init( char *argv[] )
InitializeListHead
(
&
process_ldr
.
InInitializationOrderModuleList
);
InitializeListHead
(
&
process_ldr
.
InInitializationOrderModuleList
);
/* Setup the server connection */
/* Setup the server connection */
CLIENT_InitServer
();
wine_server_init_thread
();
/* Retrieve startup info from the server */
/* Retrieve startup info from the server */
SERVER_START_REQ
(
init_process
)
SERVER_START_REQ
(
init_process
)
...
@@ -386,7 +386,13 @@ static BOOL process_init( char *argv[] )
...
@@ -386,7 +386,13 @@ static BOOL process_init( char *argv[] )
SHELL_LoadRegistry
();
SHELL_LoadRegistry
();
/* global boot finished, the rest is process-local */
/* global boot finished, the rest is process-local */
CLIENT_BootDone
(
TRACE_ON
(
server
)
);
SERVER_START_REQ
(
boot_done
)
{
req
->
debug_level
=
TRACE_ON
(
server
);
wine_server_call
(
req
);
}
SERVER_END_REQ
;
if
(
TRACE_ON
(
relay
)
||
TRACE_ON
(
snoop
))
RELAY_InitDebugLists
();
if
(
TRACE_ON
(
relay
)
||
TRACE_ON
(
snoop
))
RELAY_InitDebugLists
();
return
TRUE
;
return
TRUE
;
...
...
dlls/kernel/thread.c
View file @
52f692fb
...
@@ -189,7 +189,7 @@ static void THREAD_Start( TEB *teb )
...
@@ -189,7 +189,7 @@ static void THREAD_Start( TEB *teb )
SYSDEPS_SetCurThread
(
teb
);
SYSDEPS_SetCurThread
(
teb
);
SIGNAL_Init
();
SIGNAL_Init
();
CLIENT_InitT
hread
();
wine_server_init_t
hread
();
if
(
TRACE_ON
(
relay
))
if
(
TRACE_ON
(
relay
))
DPRINTF
(
"%04lx:Starting thread (entryproc=%p)
\n
"
,
GetCurrentThreadId
(),
func
);
DPRINTF
(
"%04lx:Starting thread (entryproc=%p)
\n
"
,
GetCurrentThreadId
(),
func
);
...
...
dlls/ntdll/Makefile.in
View file @
52f692fb
...
@@ -31,7 +31,6 @@ C_SRCS = \
...
@@ -31,7 +31,6 @@ C_SRCS = \
$(TOPOBJDIR)
/relay32/builtin32.c
\
$(TOPOBJDIR)
/relay32/builtin32.c
\
$(TOPOBJDIR)
/relay32/relay386.c
\
$(TOPOBJDIR)
/relay32/relay386.c
\
$(TOPOBJDIR)
/relay32/snoop.c
\
$(TOPOBJDIR)
/relay32/snoop.c
\
$(TOPOBJDIR)
/scheduler/client.c
\
$(TOPOBJDIR)
/scheduler/handle.c
\
$(TOPOBJDIR)
/scheduler/handle.c
\
$(TOPOBJDIR)
/scheduler/process.c
\
$(TOPOBJDIR)
/scheduler/process.c
\
$(TOPOBJDIR)
/scheduler/pthread.c
\
$(TOPOBJDIR)
/scheduler/pthread.c
\
...
@@ -58,6 +57,7 @@ C_SRCS = \
...
@@ -58,6 +57,7 @@ C_SRCS = \
rtlbitmap.c
\
rtlbitmap.c
\
rtlstr.c
\
rtlstr.c
\
sec.c
\
sec.c
\
server.c
\
signal_i386.c
\
signal_i386.c
\
signal_powerpc.c
\
signal_powerpc.c
\
signal_sparc.c
\
signal_sparc.c
\
...
...
dlls/ntdll/ntdll.spec
View file @
52f692fb
...
@@ -1062,6 +1062,7 @@
...
@@ -1062,6 +1062,7 @@
# Server interface
# Server interface
@ cdecl -norelay wine_server_call(ptr)
@ cdecl -norelay wine_server_call(ptr)
@ cdecl wine_server_init_thread()
@ cdecl wine_server_fd_to_handle(long long long ptr)
@ cdecl wine_server_fd_to_handle(long long long ptr)
@ cdecl wine_server_handle_to_fd(long long ptr ptr ptr)
@ cdecl wine_server_handle_to_fd(long long ptr ptr ptr)
...
...
scheduler/client
.c
→
dlls/ntdll/server
.c
View file @
52f692fb
/*
/*
*
Client part of the client/
server communication
*
Wine
server communication
*
*
* Copyright (C) 1998 Alexandre Julliard
* Copyright (C) 1998 Alexandre Julliard
*
*
...
@@ -76,9 +76,8 @@ struct cmsg_fd
...
@@ -76,9 +76,8 @@ struct cmsg_fd
};
};
#endif
/* HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS */
#endif
/* HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS */
static
HANDLE
boot_thread_id
;
static
sigset_t
block_set
;
/* signals to block during server calls */
static
sigset_t
block_set
;
/* signals to block during server calls */
static
int
fd_socket
;
/* socket to exchange file descriptors with the server */
static
int
fd_socket
=
-
1
;
/* socket to exchange file descriptors with the server */
#ifdef __GNUC__
#ifdef __GNUC__
static
void
fatal_error
(
const
char
*
err
,
...
)
__attribute__
((
noreturn
,
format
(
printf
,
1
,
2
)));
static
void
fatal_error
(
const
char
*
err
,
...
)
__attribute__
((
noreturn
,
format
(
printf
,
1
,
2
)));
...
@@ -602,11 +601,11 @@ static int server_connect( const char *oldcwd, const char *serverdir )
...
@@ -602,11 +601,11 @@ static int server_connect( const char *oldcwd, const char *serverdir )
/***********************************************************************
/***********************************************************************
*
CLIENT_InitServer
*
server_init
*
*
* Start the server and create the initial socket pair.
* Start the server and create the initial socket pair.
*/
*/
void
CLIENT_InitServer
(
void
)
static
void
server_init
(
void
)
{
{
int
size
;
int
size
;
char
*
oldcwd
;
char
*
oldcwd
;
...
@@ -658,23 +657,23 @@ void CLIENT_InitServer(void)
...
@@ -658,23 +657,23 @@ void CLIENT_InitServer(void)
/* receive the first thread request fd on the main socket */
/* receive the first thread request fd on the main socket */
NtCurrentTeb
()
->
request_fd
=
receive_fd
(
&
dummy_handle
);
NtCurrentTeb
()
->
request_fd
=
receive_fd
(
&
dummy_handle
);
CLIENT_InitThread
();
}
}
/***********************************************************************
/***********************************************************************
*
CLIENT_InitT
hread
*
wine_server_init_t
hread
*
*
* Send an init thread request. Return 0 if OK.
* Send an init thread request. Return 0 if OK.
*/
*/
void
CLIENT_InitT
hread
(
void
)
void
wine_server_init_t
hread
(
void
)
{
{
TEB
*
teb
=
NtCurrentTeb
();
TEB
*
teb
=
NtCurrentTeb
();
int
version
,
ret
;
int
version
,
ret
;
int
reply_pipe
[
2
];
int
reply_pipe
[
2
];
struct
sigaction
sig_act
;
struct
sigaction
sig_act
;
if
(
fd_socket
==
-
1
)
server_init
();
sig_act
.
sa_handler
=
SIG_IGN
;
sig_act
.
sa_handler
=
SIG_IGN
;
sig_act
.
sa_flags
=
0
;
sig_act
.
sa_flags
=
0
;
sigemptyset
(
&
sig_act
.
sa_mask
);
sigemptyset
(
&
sig_act
.
sa_mask
);
...
@@ -712,8 +711,6 @@ void CLIENT_InitThread(void)
...
@@ -712,8 +711,6 @@ void CLIENT_InitThread(void)
teb
->
ClientId
.
UniqueProcess
=
(
HANDLE
)
reply
->
pid
;
teb
->
ClientId
.
UniqueProcess
=
(
HANDLE
)
reply
->
pid
;
teb
->
ClientId
.
UniqueThread
=
(
HANDLE
)
reply
->
tid
;
teb
->
ClientId
.
UniqueThread
=
(
HANDLE
)
reply
->
tid
;
version
=
reply
->
version
;
version
=
reply
->
version
;
if
(
reply
->
boot
)
boot_thread_id
=
teb
->
ClientId
.
UniqueThread
;
else
if
(
boot_thread_id
==
teb
->
ClientId
.
UniqueThread
)
boot_thread_id
=
0
;
}
}
SERVER_END_REQ
;
SERVER_END_REQ
;
...
@@ -726,30 +723,3 @@ void CLIENT_InitThread(void)
...
@@ -726,30 +723,3 @@ void CLIENT_InitThread(void)
version
,
SERVER_PROTOCOL_VERSION
,
version
,
SERVER_PROTOCOL_VERSION
,
(
version
>
SERVER_PROTOCOL_VERSION
)
?
"wine"
:
"wineserver"
);
(
version
>
SERVER_PROTOCOL_VERSION
)
?
"wine"
:
"wineserver"
);
}
}
/***********************************************************************
* CLIENT_BootDone
*
* Signal that we have finished booting, and set debug level.
*/
void
CLIENT_BootDone
(
int
debug_level
)
{
SERVER_START_REQ
(
boot_done
)
{
req
->
debug_level
=
debug_level
;
wine_server_call
(
req
);
}
SERVER_END_REQ
;
}
/***********************************************************************
* CLIENT_IsBootThread
*
* Return TRUE if current thread is the boot thread.
*/
int
CLIENT_IsBootThread
(
void
)
{
return
(
GetCurrentThreadId
()
==
(
DWORD
)
boot_thread_id
);
}
include/wine/server.h
View file @
52f692fb
...
@@ -56,6 +56,7 @@ extern void wine_server_send_fd( int fd );
...
@@ -56,6 +56,7 @@ extern void wine_server_send_fd( int fd );
extern
int
wine_server_fd_to_handle
(
int
fd
,
unsigned
int
access
,
int
inherit
,
obj_handle_t
*
handle
);
extern
int
wine_server_fd_to_handle
(
int
fd
,
unsigned
int
access
,
int
inherit
,
obj_handle_t
*
handle
);
extern
int
wine_server_handle_to_fd
(
obj_handle_t
handle
,
unsigned
int
access
,
int
*
unix_fd
,
extern
int
wine_server_handle_to_fd
(
obj_handle_t
handle
,
unsigned
int
access
,
int
*
unix_fd
,
enum
fd_type
*
type
,
int
*
flags
);
enum
fd_type
*
type
,
int
*
flags
);
extern
void
wine_server_init_thread
(
void
);
/* do a server call and set the last error code */
/* do a server call and set the last error code */
inline
static
unsigned
int
wine_server_call_err
(
void
*
req_ptr
)
inline
static
unsigned
int
wine_server_call_err
(
void
*
req_ptr
)
...
@@ -113,9 +114,5 @@ inline static void wine_server_set_reply( void *req_ptr, void *ptr, unsigned int
...
@@ -113,9 +114,5 @@ inline static void wine_server_set_reply( void *req_ptr, void *ptr, unsigned int
/* non-exported functions */
/* non-exported functions */
extern
void
DECLSPEC_NORETURN
server_protocol_error
(
const
char
*
err
,
...
);
extern
void
DECLSPEC_NORETURN
server_protocol_error
(
const
char
*
err
,
...
);
extern
void
DECLSPEC_NORETURN
server_protocol_perror
(
const
char
*
err
);
extern
void
DECLSPEC_NORETURN
server_protocol_perror
(
const
char
*
err
);
extern
void
CLIENT_InitServer
(
void
);
extern
void
CLIENT_InitThread
(
void
);
extern
void
CLIENT_BootDone
(
int
debug_level
);
extern
int
CLIENT_IsBootThread
(
void
);
#endif
/* __WINE_WINE_SERVER_H */
#endif
/* __WINE_WINE_SERVER_H */
misc/registry.c
View file @
52f692fb
...
@@ -1654,6 +1654,7 @@ void SHELL_LoadRegistry( void )
...
@@ -1654,6 +1654,7 @@ void SHELL_LoadRegistry( void )
OBJECT_ATTRIBUTES
attr
;
OBJECT_ATTRIBUTES
attr
;
UNICODE_STRING
nameW
;
UNICODE_STRING
nameW
;
DWORD
count
;
DWORD
count
;
ULONG
dispos
;
BOOL
res
;
BOOL
res
;
int
all
,
period
;
int
all
,
period
;
char
tmp
[
1024
];
char
tmp
[
1024
];
...
@@ -1677,8 +1678,6 @@ void SHELL_LoadRegistry( void )
...
@@ -1677,8 +1678,6 @@ void SHELL_LoadRegistry( void )
TRACE
(
"(void)
\n
"
);
TRACE
(
"(void)
\n
"
);
if
(
!
CLIENT_IsBootThread
())
return
;
/* already loaded */
attr
.
Length
=
sizeof
(
attr
);
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
0
;
attr
.
RootDirectory
=
0
;
attr
.
ObjectName
=
&
nameW
;
attr
.
ObjectName
=
&
nameW
;
...
@@ -1686,10 +1685,17 @@ void SHELL_LoadRegistry( void )
...
@@ -1686,10 +1685,17 @@ void SHELL_LoadRegistry( void )
attr
.
SecurityDescriptor
=
NULL
;
attr
.
SecurityDescriptor
=
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
RtlInitUnicodeString
(
&
nameW
,
UserW
);
NtCreateKey
(
&
hkey_users
,
KEY_ALL_ACCESS
,
&
attr
,
0
,
NULL
,
0
,
&
dispos
);
if
(
dispos
==
REG_OPENED_EXISTING_KEY
)
{
/* someone else already loaded the registry */
NtClose
(
hkey_users
);
return
;
}
RtlInitUnicodeString
(
&
nameW
,
MachineW
);
RtlInitUnicodeString
(
&
nameW
,
MachineW
);
NtCreateKey
(
&
hkey_local_machine
,
KEY_ALL_ACCESS
,
&
attr
,
0
,
NULL
,
0
,
NULL
);
NtCreateKey
(
&
hkey_local_machine
,
KEY_ALL_ACCESS
,
&
attr
,
0
,
NULL
,
0
,
NULL
);
RtlInitUnicodeString
(
&
nameW
,
UserW
);
NtCreateKey
(
&
hkey_users
,
KEY_ALL_ACCESS
,
&
attr
,
0
,
NULL
,
0
,
NULL
);
attr
.
RootDirectory
=
hkey_users
;
attr
.
RootDirectory
=
hkey_users
;
RtlInitUnicodeString
(
&
nameW
,
DefaultW
);
RtlInitUnicodeString
(
&
nameW
,
DefaultW
);
...
...
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