modification on previous commit for blocking in expeditor
original commit: 02844bee98871bf03cf435441ba23556ad4fc6aa
This commit is contained in:
parent
2b94b98c06
commit
6fd5cb7fdd
2
LOG
2
LOG
|
@ -200,3 +200,5 @@
|
||||||
release_notes.stex
|
release_notes.stex
|
||||||
- fixed spelling of non-existent
|
- fixed spelling of non-existent
|
||||||
s/syntax.ss
|
s/syntax.ss
|
||||||
|
- 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;
|
||||||
|
@ -97,15 +101,18 @@ static ptr s_ee_read_char(IBOOL blockp) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PTHREADS
|
#ifdef PTHREADS
|
||||||
ptr tc = get_thread_context();
|
tc = get_thread_context();
|
||||||
|
if (DISABLECOUNT(tc) == FIX(0)) {
|
||||||
deactivate_thread(tc);
|
deactivate_thread(tc);
|
||||||
#endif
|
succ = ReadConsoleInput(hStdin, irInBuf, 1, &cNumRead);
|
||||||
|
|
||||||
BOOL succ = ReadConsoleInput(hStdin, irInBuf, 1, &cNumRead);
|
|
||||||
|
|
||||||
#ifdef PTHREADS
|
|
||||||
reactivate_thread(tc);
|
reactivate_thread(tc);
|
||||||
#endif
|
} else {
|
||||||
|
succ = ReadConsoleInput(hStdin, irInBuf, 1, &cNumRead);
|
||||||
|
}
|
||||||
|
#else /* PTHREADS */
|
||||||
|
succ = ReadConsoleInput(hStdin, irInBuf, 1, &cNumRead);
|
||||||
|
#endif /* PTHREADS */
|
||||||
|
|
||||||
|
|
||||||
if (!succ)
|
if (!succ)
|
||||||
S_error1("expeditor", "error getting console info: ~a",
|
S_error1("expeditor", "error getting console info: ~a",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user