summaryrefslogtreecommitdiff
path: root/term
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1996-08-15 20:22:59 +0000
committerThomas Bushnell <thomas@gnu.org>1996-08-15 20:22:59 +0000
commite8ac42dc5d09570b2a65b411a966880f67a792a9 (patch)
tree6c2ca7500ee157fea5a60d20b8484e49b1eef589 /term
parent6436e3dfe7702d3f4f92379e1815c161ea930418 (diff)
*** empty log message ***
Diffstat (limited to 'term')
-rw-r--r--term/ChangeLog8
-rw-r--r--term/main.c6
-rw-r--r--term/term.h3
-rw-r--r--term/users.c40
4 files changed, 54 insertions, 3 deletions
diff --git a/term/ChangeLog b/term/ChangeLog
index b61002cf..1e4854c6 100644
--- a/term/ChangeLog
+++ b/term/ChangeLog
@@ -1,3 +1,11 @@
+Thu Aug 15 16:07:07 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
+
+ * users.c (trivfs_S_io_pathconf): Implement function.
+
+ * term.h (QUEUE_HIWAT, QUEUE_LOWAT): New macros.
+ * main.c (main): Use these new macros to create inputq, rawq, and
+ outputq.
+
Thu Aug 15 15:32:47 1996 Miles Bader <miles@gnu.ai.mit.edu>
* users.c (trivfs_S_file_check_access): Renamed from
diff --git a/term/main.c b/term/main.c
index d0702e83..2f8ac449 100644
--- a/term/main.c
+++ b/term/main.c
@@ -180,9 +180,9 @@ main (int argc, char **argv)
term_owner = term_group = 0;
term_mode = (bottom == &ptyio_bottom ? 0666 : 0600) | S_IFCHR;
- inputq = create_queue (256, 100, 300);
- rawq = create_queue (256, 100, 300);
- outputq = create_queue (256, 100, 300);
+ inputq = create_queue (256, QUEUE_LOWAT, QUEUE_HIWAT);
+ rawq = create_queue (256, QUEUE_LOWAT, QUEUE_HIWAT);
+ outputq = create_queue (256, QUEUE_LOWAT, QUEUE_HIWAT);
if (bottom == &ptyio_bottom)
ptyio_init ();
diff --git a/term/term.h b/term/term.h
index b30ac826..05c44b51 100644
--- a/term/term.h
+++ b/term/term.h
@@ -70,6 +70,9 @@ long termflags;
#define NO_OWNER 0x00000200 /* there is no foreground_id */
#define ICKY_ASYNC 0x00000400 /* some user has set O_ASYNC */
+#define QUEUE_LOWAT 100
+#define QUEUE_HIWAT 300
+
/* Global lock */
struct mutex global_lock;
diff --git a/term/users.c b/term/users.c
index dbddd5e8..cf89fee5 100644
--- a/term/users.c
+++ b/term/users.c
@@ -742,6 +742,46 @@ trivfs_S_io_read (struct trivfs_protid *cred,
}
error_t
+trivfs_S_io_pathconf (struct trivfs_protid *cred,
+ mach_port_t reply,
+ mach_msg_type_name_t reply_type,
+ int name,
+ int *val)
+{
+ if (!cred)
+ return EOPNOTSUPP;
+
+ switch (name)
+ {
+ case _PC_LINK_MAX:
+ case _PC_NAME_MAX:
+ case _PC_PATH_MAX:
+ case _PC_PIPE_BUF:
+ case _PC_NO_TRUNC:
+ default:
+ return io_pathconf (cred->realnode, name, val);
+
+ case _PC_MAX_CANON:
+ *val = rawq->hiwat;
+ return 0;
+
+ case _PC_MAX_INPUT:
+ *val = inputq->hiwat;
+ return 0;
+
+ case _PC_CHOWN_RESTRICTED:
+ /* We implement this locally, remember... */
+ *val = 1;
+ return 0;
+
+ case _PC_VDISABLE:
+ *val = _POSIX_VDISABLE;
+ return 0;
+ }
+}
+
+
+error_t
trivfs_S_io_readable (struct trivfs_protid *cred,
mach_port_t reply,
mach_msg_type_name_t replytype,