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
ac256c73
Commit
ac256c73
authored
Nov 28, 2010
by
Eric Pouech
Committed by
Alexandre Julliard
Nov 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineconsole: Move the curses critical section inside the private data.
parent
ead47126
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
curses.c
programs/wineconsole/curses.c
+7
-6
No files found.
programs/wineconsole/curses.c
View file @
ac256c73
...
...
@@ -73,13 +73,12 @@ struct inner_data_curse
unsigned
long
initial_mouse_mask
;
int
sync_pipe
[
2
];
HANDLE
input_thread
;
CRITICAL_SECTION
lock
;
WINDOW
*
pad
;
chtype
*
line
;
int
allow_scroll
;
};
static
CRITICAL_SECTION
WCCURSES_CritSect
;
static
void
*
nc_handle
=
NULL
;
#ifdef initscr
/* work around Solaris breakage */
...
...
@@ -953,7 +952,7 @@ static DWORD CALLBACK input_thread( void *arg )
if
(
!
(
pfd
[
0
].
revents
&
POLLIN
))
continue
;
/* we're called from input thread (not main thread), so force unique access */
EnterCriticalSection
(
&
WCCURSES_CritSect
);
EnterCriticalSection
(
&
PRIVATE
(
data
)
->
lock
);
if
((
inchar
=
wgetch
(
stdscr
))
!=
ERR
)
{
WINE_TRACE
(
"Got o%o (0x%x)
\n
"
,
inchar
,
inchar
);
...
...
@@ -965,7 +964,7 @@ static DWORD CALLBACK input_thread( void *arg )
if
(
numEvent
)
WriteConsoleInputW
(
data
->
hConIn
,
ir
,
numEvent
,
&
n
);
}
LeaveCriticalSection
(
&
WCCURSES_CritSect
);
LeaveCriticalSection
(
&
PRIVATE
(
data
)
->
lock
);
}
close
(
PRIVATE
(
data
)
->
sync_pipe
[
0
]
);
return
0
;
...
...
@@ -986,6 +985,7 @@ static void WCCURSES_DeleteBackend(struct inner_data* data)
WaitForSingleObject
(
PRIVATE
(
data
)
->
input_thread
,
INFINITE
);
CloseHandle
(
PRIVATE
(
data
)
->
input_thread
);
}
DeleteCriticalSection
(
&
PRIVATE
(
data
)
->
lock
);
delwin
(
PRIVATE
(
data
)
->
pad
);
#ifdef HAVE_MOUSEMASK
...
...
@@ -1018,9 +1018,9 @@ static int WCCURSES_MainLoop(struct inner_data* data)
while
(
cont
&&
WaitForSingleObject
(
data
->
hSynchro
,
INFINITE
)
==
WAIT_OBJECT_0
)
{
EnterCriticalSection
(
&
WCCURSES_CritSect
);
EnterCriticalSection
(
&
PRIVATE
(
data
)
->
lock
);
cont
=
WINECON_GrabChanges
(
data
);
LeaveCriticalSection
(
&
WCCURSES_CritSect
);
LeaveCriticalSection
(
&
PRIVATE
(
data
)
->
lock
);
}
close
(
PRIVATE
(
data
)
->
sync_pipe
[
1
]
);
...
...
@@ -1103,6 +1103,7 @@ enum init_return WCCURSES_InitBackend(struct inner_data* data)
PRIVATE
(
data
)
->
initial_mouse_mask
=
mm
;
}
#endif
InitializeCriticalSection
(
&
PRIVATE
(
data
)
->
lock
);
return
init_success
;
}
...
...
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