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
21d631e2
Commit
21d631e2
authored
Jan 18, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Move the LDT section to ntdll and make it an uninterruptible section.
parent
3ccf5012
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
26 deletions
+39
-26
kernel_main.c
dlls/kernel32/kernel_main.c
+0
-26
thread.c
dlls/ntdll/thread.c
+39
-0
No files found.
dlls/kernel32/kernel_main.c
View file @
21d631e2
...
...
@@ -43,29 +43,6 @@
extern
int
__wine_set_signal_handler
(
unsigned
,
int
(
*
)(
unsigned
));
static
CRITICAL_SECTION
ldt_section
;
static
CRITICAL_SECTION_DEBUG
critsect_debug
=
{
0
,
0
,
&
ldt_section
,
{
&
critsect_debug
.
ProcessLocksList
,
&
critsect_debug
.
ProcessLocksList
},
0
,
0
,
{
(
DWORD_PTR
)(
__FILE__
": ldt_section"
)
}
};
static
CRITICAL_SECTION
ldt_section
=
{
&
critsect_debug
,
-
1
,
0
,
0
,
0
,
0
};
/***********************************************************************
* locking for LDT routines
*/
static
void
ldt_lock
(
void
)
{
RtlEnterCriticalSection
(
&
ldt_section
);
}
static
void
ldt_unlock
(
void
)
{
RtlLeaveCriticalSection
(
&
ldt_section
);
}
/***********************************************************************
* KERNEL thread initialisation routine
*/
...
...
@@ -141,9 +118,6 @@ static BOOL process_attach(void)
}
#endif
/* initialize LDT locking */
wine_ldt_init_locking
(
ldt_lock
,
ldt_unlock
);
/* finish the process initialisation for console bits, if needed */
__wine_set_signal_handler
(
SIGINT
,
CONSOLE_HandleCtrlC
);
...
...
dlls/ntdll/thread.c
View file @
21d631e2
...
...
@@ -63,6 +63,41 @@ static ULONG sigstack_zero_bits;
struct
wine_pthread_functions
pthread_functions
=
{
NULL
};
static
RTL_CRITICAL_SECTION
ldt_section
;
static
RTL_CRITICAL_SECTION_DEBUG
critsect_debug
=
{
0
,
0
,
&
ldt_section
,
{
&
critsect_debug
.
ProcessLocksList
,
&
critsect_debug
.
ProcessLocksList
},
0
,
0
,
{
(
DWORD_PTR
)(
__FILE__
": ldt_section"
)
}
};
static
RTL_CRITICAL_SECTION
ldt_section
=
{
&
critsect_debug
,
-
1
,
0
,
0
,
0
,
0
};
static
sigset_t
ldt_sigset
;
/***********************************************************************
* locking for LDT routines
*/
static
void
ldt_lock
(
void
)
{
sigset_t
sigset
;
pthread_functions
.
sigprocmask
(
SIG_BLOCK
,
&
server_block_set
,
&
sigset
);
RtlEnterCriticalSection
(
&
ldt_section
);
if
(
ldt_section
.
RecursionCount
==
1
)
ldt_sigset
=
sigset
;
}
static
void
ldt_unlock
(
void
)
{
if
(
ldt_section
.
RecursionCount
==
1
)
{
sigset_t
sigset
=
ldt_sigset
;
RtlLeaveCriticalSection
(
&
ldt_section
);
pthread_functions
.
sigprocmask
(
SIG_SETMASK
,
&
sigset
,
NULL
);
}
else
RtlLeaveCriticalSection
(
&
ldt_section
);
}
/***********************************************************************
* init_teb
*/
...
...
@@ -285,6 +320,10 @@ HANDLE thread_init(void)
wine_server_fd_to_handle
(
1
,
GENERIC_WRITE
|
SYNCHRONIZE
,
OBJ_INHERIT
,
&
params
.
hStdOutput
);
wine_server_fd_to_handle
(
2
,
GENERIC_WRITE
|
SYNCHRONIZE
,
OBJ_INHERIT
,
&
params
.
hStdError
);
}
/* initialize LDT locking */
wine_ldt_init_locking
(
ldt_lock
,
ldt_unlock
);
return
exe_file
;
}
...
...
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