ref: 483f1ba6028d9b99d868d722715828bd6e739644
parent: d1822db1876754048ade2278aba664a6545590c8
parent: a8af25ef8105058d4bde5674701a2f6a9024e80a
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri Mar 14 20:56:36 EDT 2014
merge
--- a/sys/src/9/bcm/main.c
+++ b/sys/src/9/bcm/main.c
@@ -430,17 +430,18 @@
uintptr pa;
char *p;
- if(p = getconf("*kernelpercent"))
- userpcnt = 100 - strtol(p, 0, 0);
- else
- userpcnt = 0;
-
- if(0 && (p = getconf("service")) != nil){
+ if(p = getconf("service")){
if(strcmp(p, "cpu") == 0)
cpuserver = 1;
else if(strcmp(p,"terminal") == 0)
cpuserver = 0;
}
+
+ if(p = getconf("*kernelpercent"))
+ userpcnt = 100 - strtol(p, 0, 0);
+ else
+ userpcnt = 0;
+
if((p = getconf("*maxmem")) != nil){
memsize = strtoul(p, 0, 0) - PHYSDRAM;
if (memsize < 16*MB) /* sanity */
--- a/sys/src/9/pc/main.c
+++ b/sys/src/9/pc/main.c
@@ -416,6 +416,13 @@
int i, userpcnt;
ulong kpages;
+ if(p = getconf("service")){
+ if(strcmp(p, "cpu") == 0)
+ cpuserver = 1;
+ else if(strcmp(p,"terminal") == 0)
+ cpuserver = 0;
+ }
+
if(p = getconf("*kernelpercent"))
userpcnt = 100 - strtol(p, 0, 0);
else
--- a/sys/src/9/pc64/main.c
+++ b/sys/src/9/pc64/main.c
@@ -140,6 +140,13 @@
int i, userpcnt;
ulong kpages;
+ if(p = getconf("service")){
+ if(strcmp(p, "cpu") == 0)
+ cpuserver = 1;
+ else if(strcmp(p,"terminal") == 0)
+ cpuserver = 0;
+ }
+
if(p = getconf("*kernelpercent"))
userpcnt = 100 - strtol(p, 0, 0);
else
--- a/sys/src/9/ppc/main.c
+++ b/sys/src/9/ppc/main.c
@@ -334,6 +334,13 @@
ulong pa, kpages;
/* passed in from ROM monitor: */
+ if(p = getconf("service")){
+ if(strcmp(p, "cpu") == 0)
+ cpuserver = 1;
+ else if(strcmp(p,"terminal") == 0)
+ cpuserver = 0;
+ }
+
if(p = getconf("*kernelpercent"))
userpcnt = 100 - strtol(p, 0, 0);
else
--- a/sys/src/9/teg2/main.c
+++ b/sys/src/9/teg2/main.c
@@ -833,6 +833,13 @@
uintptr pa;
char *p;
+ if(p = getconf("service")){
+ if(strcmp(p, "cpu") == 0)
+ cpuserver = 1;
+ else if(strcmp(p,"terminal") == 0)
+ cpuserver = 0;
+ }
+
/*
* Copy the physical memory configuration to Conf.mem.
*/
@@ -912,8 +919,6 @@
* be careful with 32-bit overflow.
*/
imagmem->maxsize = kpages;
-
-// archconfinit();
}
int