Merge branch 'yjqww6-master'
original commit: 461bd944847bc9a1ff54a804fec450cd86969990
This commit is contained in:
commit
8d28c6afb9
2
LOG
2
LOG
|
@ -207,3 +207,5 @@
|
|||
c/Mf-*, c/Makefile.*nt
|
||||
- removed unnecessary datestamp.c target
|
||||
c/Mf.*nt
|
||||
- fixed unnessesary blocking in expeditor on Windows.
|
||||
c/expeditor.c
|
||||
|
|
|
@ -73,6 +73,10 @@ static IBOOL s_ee_init_term(void) {
|
|||
static ptr s_ee_read_char(IBOOL blockp) {
|
||||
DWORD cNumRead;
|
||||
INPUT_RECORD irInBuf[1];
|
||||
#ifdef PTHREADS
|
||||
ptr tc;
|
||||
#endif /* PTHREADS */
|
||||
BOOL succ;
|
||||
static char buf[10];
|
||||
static int bufidx = 0;
|
||||
static int buflen = 0;
|
||||
|
@ -96,7 +100,21 @@ static ptr s_ee_read_char(IBOOL blockp) {
|
|||
if (NumberOfEvents == 0) return Sfalse;
|
||||
}
|
||||
|
||||
if (!ReadConsoleInput(hStdin, irInBuf, 1, &cNumRead))
|
||||
#ifdef PTHREADS
|
||||
tc = get_thread_context();
|
||||
if (DISABLECOUNT(tc) == FIX(0)) {
|
||||
deactivate_thread(tc);
|
||||
succ = ReadConsoleInput(hStdin, irInBuf, 1, &cNumRead);
|
||||
reactivate_thread(tc);
|
||||
} else {
|
||||
succ = ReadConsoleInput(hStdin, irInBuf, 1, &cNumRead);
|
||||
}
|
||||
#else /* PTHREADS */
|
||||
succ = ReadConsoleInput(hStdin, irInBuf, 1, &cNumRead);
|
||||
#endif /* PTHREADS */
|
||||
|
||||
|
||||
if (!succ)
|
||||
S_error1("expeditor", "error getting console info: ~a",
|
||||
S_LastErrorString());
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user