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
|
c/Mf-*, c/Makefile.*nt
|
||||||
- removed unnecessary datestamp.c target
|
- removed unnecessary datestamp.c target
|
||||||
c/Mf.*nt
|
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) {
|
static ptr s_ee_read_char(IBOOL blockp) {
|
||||||
DWORD cNumRead;
|
DWORD cNumRead;
|
||||||
INPUT_RECORD irInBuf[1];
|
INPUT_RECORD irInBuf[1];
|
||||||
|
#ifdef PTHREADS
|
||||||
|
ptr tc;
|
||||||
|
#endif /* PTHREADS */
|
||||||
|
BOOL succ;
|
||||||
static char buf[10];
|
static char buf[10];
|
||||||
static int bufidx = 0;
|
static int bufidx = 0;
|
||||||
static int buflen = 0;
|
static int buflen = 0;
|
||||||
|
@ -96,7 +100,21 @@ static ptr s_ee_read_char(IBOOL blockp) {
|
||||||
if (NumberOfEvents == 0) return Sfalse;
|
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_error1("expeditor", "error getting console info: ~a",
|
||||||
S_LastErrorString());
|
S_LastErrorString());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user