shithub: riscv

Download patch

ref: 4eee8f13cf05eba3e26ca857275641a5362c89f2
parent: 95c166fc35a918337c6958c7ae9e6b6214ad9c07
author: 23hiro <[email protected]>
date: Sun Dec 22 20:31:30 EST 2019

rio, kbdfs: increase read buffer for high latency kbdfs support

--- a/sys/src/cmd/aux/kbdfs/kbdfs.c
+++ b/sys/src/cmd/aux/kbdfs/kbdfs.c
@@ -1575,13 +1575,13 @@
 	consreqchan = chancreate(sizeof(Req*), 0);
 	kbdreqchan = chancreate(sizeof(Req*), 0);
 
-	keychan = chancreate(sizeof(Key), 8);
-	mctlchan = chancreate(sizeof(Key), 8);
+	keychan = chancreate(sizeof(Key), 64);
+	mctlchan = chancreate(sizeof(Key), 64);
 	ctlchan = chancreate(sizeof(int), 0);
 	rawchan = chancreate(sizeof(Rune), 0);
-	runechan = chancreate(sizeof(Rune), 32);
-	conschan = chancreate(sizeof(char*), 16);
-	kbdchan = chancreate(sizeof(char*), 16);
+	runechan = chancreate(sizeof(Rune), 256);
+	conschan = chancreate(sizeof(char*), 128);
+	kbdchan = chancreate(sizeof(char*), 128);
 	intchan = chancreate(sizeof(int), 0);
 
 	threadpostmountsrv(&fs, sname, mntpt, MBEFORE);
--- a/sys/src/cmd/rio/rio.c
+++ b/sys/src/cmd/rio/rio.c
@@ -1157,7 +1157,7 @@
 		hidden[nhidden++] = w;
 		w->screenr = ZR;
 	}
-	threadcreate(winctl, w, 8192);
+	threadcreate(winctl, w, STACK);
 	if(!hideit)
 		wcurrent(w);
 	if(pid == 0){
@@ -1170,7 +1170,7 @@
 		else
 			arg[3] = argv;
 		arg[4] = dir;
-		proccreate(winshell, arg, 8192);
+		proccreate(winshell, arg, STACK);
 		pid = recvul(cpid);
 		free(arg);
 	}
@@ -1194,7 +1194,7 @@
 kbdproc(void *arg)
 {
 	Channel *c = arg;
-	char buf[128], *p, *e;
+	char buf[1024], *p, *e;
 	int fd, cfd, kfd, n;
 
 	threadsetname("kbdproc");