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
161693e4
Commit
161693e4
authored
Nov 07, 1999
by
James Abbatiello
Committed by
Alexandre Julliard
Nov 07, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Addresses issues with multiple processes accessing non-global critical
sections.
parent
942010a7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
10 deletions
+13
-10
heap.c
memory/heap.c
+4
-2
critsection.c
scheduler/critsection.c
+7
-8
queue.c
windows/queue.c
+2
-0
No files found.
memory/heap.c
View file @
161693e4
...
@@ -519,8 +519,10 @@ static BOOL HEAP_InitSubHeap( HEAP *heap, LPVOID address, DWORD flags,
...
@@ -519,8 +519,10 @@ static BOOL HEAP_InitSubHeap( HEAP *heap, LPVOID address, DWORD flags,
/* Initialize critical section */
/* Initialize critical section */
InitializeCriticalSection
(
&
heap
->
critSection
);
InitializeCriticalSection
(
&
heap
->
critSection
);
if
(
!
SystemHeap
)
/* System heap critical section has to be global */
/* FIXME: once separate address spaces are implemented, only */
MakeCriticalSectionGlobal
(
&
heap
->
critSection
);
/* the SystemHeap critical section should be global */
/* if (!SystemHeap) */
MakeCriticalSectionGlobal
(
&
heap
->
critSection
);
}
}
/* Create the first free block */
/* Create the first free block */
...
...
scheduler/critsection.c
View file @
161693e4
...
@@ -64,6 +64,12 @@ void WINAPI EnterCriticalSection( CRITICAL_SECTION *crit )
...
@@ -64,6 +64,12 @@ void WINAPI EnterCriticalSection( CRITICAL_SECTION *crit )
FIXME_
(
win32
)(
"entering uninitialized section(%p)?
\n
"
,
crit
);
FIXME_
(
win32
)(
"entering uninitialized section(%p)?
\n
"
,
crit
);
InitializeCriticalSection
(
crit
);
InitializeCriticalSection
(
crit
);
}
}
if
(
crit
->
Reserved
&&
crit
->
Reserved
!=
GetCurrentProcessId
()
)
{
FIXME_
(
win32
)(
"Crst %p belongs to process %ld, current is %ld!
\n
"
,
crit
,
crit
->
Reserved
,
GetCurrentProcessId
()
);
return
;
}
if
(
InterlockedIncrement
(
&
crit
->
LockCount
))
if
(
InterlockedIncrement
(
&
crit
->
LockCount
))
{
{
if
(
crit
->
OwningThread
==
GetCurrentThreadId
())
if
(
crit
->
OwningThread
==
GetCurrentThreadId
())
...
@@ -71,15 +77,8 @@ void WINAPI EnterCriticalSection( CRITICAL_SECTION *crit )
...
@@ -71,15 +77,8 @@ void WINAPI EnterCriticalSection( CRITICAL_SECTION *crit )
crit
->
RecursionCount
++
;
crit
->
RecursionCount
++
;
return
;
return
;
}
}
/* Now wait for it */
if
(
crit
->
Reserved
&&
crit
->
Reserved
!=
GetCurrentProcessId
()
)
{
FIXME_
(
win32
)(
"Crst %p belongs to process %ld, current is %ld!
\n
"
,
crit
,
crit
->
Reserved
,
GetCurrentProcessId
()
);
return
;
}
/* Now wait for it */
res
=
WaitForSingleObject
(
crit
->
LockSemaphore
,
5000L
);
res
=
WaitForSingleObject
(
crit
->
LockSemaphore
,
5000L
);
if
(
res
==
WAIT_TIMEOUT
)
if
(
res
==
WAIT_TIMEOUT
)
{
{
...
...
windows/queue.c
View file @
161693e4
...
@@ -85,6 +85,8 @@ PERQUEUEDATA * PERQDATA_CreateInstance( )
...
@@ -85,6 +85,8 @@ PERQUEUEDATA * PERQDATA_CreateInstance( )
* since this may be shared by different threads. see AttachThreadInput()
* since this may be shared by different threads. see AttachThreadInput()
*/
*/
InitializeCriticalSection
(
&
pQData
->
cSection
);
InitializeCriticalSection
(
&
pQData
->
cSection
);
/* FIXME: not all per queue data critical sections should be global */
MakeCriticalSectionGlobal
(
&
pQData
->
cSection
);
/* Save perQData globally for 16 bit tasks */
/* Save perQData globally for 16 bit tasks */
if
(
bIsWin16
)
if
(
bIsWin16
)
...
...
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