summaryrefslogtreecommitdiff
path: root/term/term.h
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-04-24 03:10:51 +0000
committerMiles Bader <miles@gnu.org>1996-04-24 03:10:51 +0000
commit22371ccd2d6a8df14cb5c888d9ae967327df44da (patch)
treef31b06cf83e532bb4ca8d49043e76ddb6591007c /term/term.h
parent813b19875b7c2d07b3e0bea4aca455eaf5b21a20 (diff)
(enqueue_internal): Use call_asyncs on every character.
(SUPPRESS_ASYNC): New flag.
Diffstat (limited to 'term/term.h')
-rw-r--r--term/term.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/term/term.h b/term/term.h
index 3396a459..e8c46526 100644
--- a/term/term.h
+++ b/term/term.h
@@ -66,6 +66,7 @@ long termflags;
#define EXCL_USE 0x00000100 /* user accessible exclusive use */
#define NO_OWNER 0x00000200 /* there is no foreground_id */
#define ICKY_ASYNC 0x00000400 /* some user has set O_ASYNC */
+#define SUPPRESS_ASYNC 0x00000800 /* don't signal asyncs on every char */
/* Global lock */
struct mutex global_lock;
@@ -174,7 +175,7 @@ clear_queue (struct queue *q)
}
/* Should be below, but inlines need it. */
-void call_asyncs (void);
+void call_asyncs (int force);
/* Return the next character off Q; leave the quoting bit on. */
extern inline quoted_char
@@ -194,7 +195,7 @@ dequeue_quote (struct queue *q)
{
condition_broadcast (q->wait);
if (q == outputq)
- call_asyncs ();
+ call_asyncs (1);
}
return *q->cs++;
}
@@ -220,12 +221,10 @@ enqueue_internal (struct queue **qp, quoted_char c)
*q->ce++ = c;
if (qsize (q) == 1)
- {
- condition_broadcast (q->wait);
- if (q == inputq)
- call_asyncs ();
- }
-
+ condition_broadcast (q->wait);
+ if (q == inputq && (termflags & ICKY_ASYNC))
+ call_asyncs (0);
+
if (!q->susp && (qsize (q) > q->hiwat))
q->susp = 1;
}