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
64ae5a57
Commit
64ae5a57
authored
May 02, 1999
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved a few more initialisations to the new process context.
parent
1c4c409f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
28 deletions
+19
-28
process.c
scheduler/process.c
+19
-28
No files found.
scheduler/process.c
View file @
64ae5a57
...
@@ -456,8 +456,7 @@ void PROCESS_Start(void)
...
@@ -456,8 +456,7 @@ void PROCESS_Start(void)
LPTHREAD_START_ROUTINE
entry
;
LPTHREAD_START_ROUTINE
entry
;
THDB
*
thdb
=
THREAD_Current
();
THDB
*
thdb
=
THREAD_Current
();
PDB
*
pdb
=
thdb
->
process
;
PDB
*
pdb
=
thdb
->
process
;
TDB
*
pTask
=
(
TDB
*
)
GlobalLock16
(
pdb
->
task
);
NE_MODULE
*
pModule
=
NE_GetPtr
(
pdb
->
module
);
NE_MODULE
*
pModule
=
NE_GetPtr
(
pTask
->
hModule
);
OFSTRUCT
*
ofs
=
(
OFSTRUCT
*
)((
char
*
)(
pModule
)
+
(
pModule
)
->
fileinfo
);
OFSTRUCT
*
ofs
=
(
OFSTRUCT
*
)((
char
*
)(
pModule
)
+
(
pModule
)
->
fileinfo
);
IMAGE_OPTIONAL_HEADER
*
header
=
&
PE_HEADER
(
pModule
->
module32
)
->
OptionalHeader
;
IMAGE_OPTIONAL_HEADER
*
header
=
&
PE_HEADER
(
pModule
->
module32
)
->
OptionalHeader
;
...
@@ -467,7 +466,6 @@ void PROCESS_Start(void)
...
@@ -467,7 +466,6 @@ void PROCESS_Start(void)
PROCESS_CallUserSignalProc
(
USIG_THREAD_INIT
,
0
,
0
);
/* for initial thread */
PROCESS_CallUserSignalProc
(
USIG_THREAD_INIT
,
0
,
0
);
/* for initial thread */
/* Initialize the critical section */
/* Initialize the critical section */
InitializeCriticalSection
(
&
pdb
->
crit_section
);
InitializeCriticalSection
(
&
pdb
->
crit_section
);
#if 0
#if 0
...
@@ -479,15 +477,15 @@ void PROCESS_Start(void)
...
@@ -479,15 +477,15 @@ void PROCESS_Start(void)
#endif
#endif
/* Create the environment db */
/* Create the environment db */
if
(
!
PROCESS_CreateEnvDB
())
goto
error
;
if
(
!
PROCESS_CreateEnvDB
())
goto
error
;
#if 0
/* Create a task for this process */
if
(
pdb
->
env_db
->
startup_info
->
dwFlags
&
STARTF_USESHOWWINDOW
)
if
(
pdb
->
env_db
->
startup_info
->
dwFlags
&
STARTF_USESHOWWINDOW
)
cmdShow
=
pdb
->
env_db
->
startup_info
->
wShowWindow
;
cmdShow
=
pdb
->
env_db
->
startup_info
->
wShowWindow
;
if
(
!
TASK_Create
(
thdb
,
pModule
,
0
,
0
,
cmdShow
))
goto
error
;
if
(
!
TASK_Create
(
thdb
,
pModule
,
0
,
0
,
cmdShow
))
goto
error
;
#endif
/* Link the task in the task list */
TASK_StartTask
(
pdb
->
task
);
PROCESS_CallUserSignalProc
(
USIG_PROCESS_INIT
,
0
,
0
);
PROCESS_CallUserSignalProc
(
USIG_PROCESS_INIT
,
0
,
0
);
...
@@ -499,8 +497,8 @@ void PROCESS_Start(void)
...
@@ -499,8 +497,8 @@ void PROCESS_Start(void)
if
(
!
PE_CreateModule
(
pModule
->
module32
,
ofs
,
0
,
FALSE
))
goto
error
;
if
(
!
PE_CreateModule
(
pModule
->
module32
,
ofs
,
0
,
FALSE
))
goto
error
;
/* Increment EXE refcount */
/* Increment EXE refcount */
assert
(
PROCESS_Current
()
->
exe_modref
);
assert
(
pdb
->
exe_modref
);
PROCESS_Current
()
->
exe_modref
->
refCount
++
;
pdb
->
exe_modref
->
refCount
++
;
PROCESS_CallUserSignalProc
(
USIG_PROCESS_LOADED
,
0
,
0
);
/* FIXME: correct location? */
PROCESS_CallUserSignalProc
(
USIG_PROCESS_LOADED
,
0
,
0
);
/* FIXME: correct location? */
...
@@ -576,8 +574,19 @@ PDB *PROCESS_Create( NE_MODULE *pModule, LPCSTR cmd_line, LPCSTR env,
...
@@ -576,8 +574,19 @@ PDB *PROCESS_Create( NE_MODULE *pModule, LPCSTR cmd_line, LPCSTR env,
info
->
hProcess
=
reply
.
handle
;
info
->
hProcess
=
reply
.
handle
;
info
->
dwProcessId
=
(
DWORD
)
pdb
->
server_pid
;
info
->
dwProcessId
=
(
DWORD
)
pdb
->
server_pid
;
/* Call USER signal proc */
PROCESS_CallUserSignalProc
(
USIG_PROCESS_CREATE
,
info
->
dwProcessId
,
0
);
if
(
pModule
->
module32
)
if
(
pModule
->
module32
)
{
{
/* Create the main thread */
size
=
PE_HEADER
(
pModule
->
module32
)
->
OptionalHeader
.
SizeOfStackReserve
;
if
(
!
(
thdb
=
THREAD_Create
(
pdb
,
0L
,
size
,
TRUE
,
tsa
,
&
server_thandle
)))
goto
error
;
info
->
hThread
=
server_thandle
;
info
->
dwThreadId
=
(
DWORD
)
thdb
->
server_tid
;
thdb
->
startup
=
PROCESS_Start
;
/* Create the heap */
/* Create the heap */
size
=
PE_HEADER
(
pModule
->
module32
)
->
OptionalHeader
.
SizeOfHeapReserve
;
size
=
PE_HEADER
(
pModule
->
module32
)
->
OptionalHeader
.
SizeOfHeapReserve
;
commit
=
PE_HEADER
(
pModule
->
module32
)
->
OptionalHeader
.
SizeOfHeapCommit
;
commit
=
PE_HEADER
(
pModule
->
module32
)
->
OptionalHeader
.
SizeOfHeapCommit
;
...
@@ -587,23 +596,8 @@ PDB *PROCESS_Create( NE_MODULE *pModule, LPCSTR cmd_line, LPCSTR env,
...
@@ -587,23 +596,8 @@ PDB *PROCESS_Create( NE_MODULE *pModule, LPCSTR cmd_line, LPCSTR env,
/* Inherit the env DB from the parent */
/* Inherit the env DB from the parent */
if
(
!
PROCESS_InheritEnvDB
(
pdb
,
cmd_line
,
env
,
inherit
,
startup
))
goto
error
;
if
(
!
PROCESS_InheritEnvDB
(
pdb
,
cmd_line
,
env
,
inherit
,
startup
))
goto
error
;
/* Call USER signal proc */
/* Set the process module (FIXME: hack) */
PROCESS_CallUserSignalProc
(
USIG_PROCESS_CREATE
,
info
->
dwProcessId
,
0
);
pdb
->
module
=
pModule
->
self
;
/* Create the main thread */
size
=
PE_HEADER
(
pModule
->
module32
)
->
OptionalHeader
.
SizeOfStackReserve
;
if
(
!
(
thdb
=
THREAD_Create
(
pdb
,
0L
,
size
,
hInstance
==
0
,
tsa
,
&
server_thandle
)))
goto
error
;
info
->
hThread
=
server_thandle
;
info
->
dwThreadId
=
(
DWORD
)
thdb
->
server_tid
;
thdb
->
startup
=
PROCESS_Start
;
/* Create a Win16 task for this process */
if
(
startup
->
dwFlags
&
STARTF_USESHOWWINDOW
)
cmdShow
=
startup
->
wShowWindow
;
if
(
!
TASK_Create
(
thdb
,
pModule
,
hInstance
,
hPrevInstance
,
cmdShow
))
goto
error
;
/* Start the task */
TASK_StartTask
(
pdb
->
task
);
SYSDEPS_SpawnThread
(
thdb
);
SYSDEPS_SpawnThread
(
thdb
);
}
}
else
/* Create a 16-bit process */
else
/* Create a 16-bit process */
...
@@ -620,9 +614,6 @@ PDB *PROCESS_Create( NE_MODULE *pModule, LPCSTR cmd_line, LPCSTR env,
...
@@ -620,9 +614,6 @@ PDB *PROCESS_Create( NE_MODULE *pModule, LPCSTR cmd_line, LPCSTR env,
/* Inherit the env DB from the parent */
/* Inherit the env DB from the parent */
if
(
!
PROCESS_InheritEnvDB
(
pdb
,
cmd_line
,
env
,
inherit
,
startup
))
goto
error
;
if
(
!
PROCESS_InheritEnvDB
(
pdb
,
cmd_line
,
env
,
inherit
,
startup
))
goto
error
;
/* Call USER signal proc */
PROCESS_CallUserSignalProc
(
USIG_PROCESS_CREATE
,
info
->
dwProcessId
,
0
);
/* Create the main thread */
/* Create the main thread */
if
(
!
(
thdb
=
THREAD_Create
(
pdb
,
0L
,
0
,
hInstance
==
0
,
tsa
,
&
server_thandle
)))
if
(
!
(
thdb
=
THREAD_Create
(
pdb
,
0L
,
0
,
hInstance
==
0
,
tsa
,
&
server_thandle
)))
goto
error
;
goto
error
;
...
...
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