M port/devproc.c => port/devproc.c +2 -2
@@ 737,10 737,10 @@ procctlreq(Proc *p, char *va, int n)
else
if(strncmp(buf, "pri", 3) == 0){
if(n < 4)
- error(Ebadarg);
+ error(Ebadctl);
i = atoi(buf+4);
if(i < 0 || i >= Nrq)
- error(Ebadarg);
+ error(Ebadctl);
p->basepri = i;
}
else
M port/portdat.h => port/portdat.h +3 -12
@@ 32,7 32,6 @@ typedef struct Rendez Rendez;
typedef struct Rgrp Rgrp;
typedef struct RWlock RWlock;
typedef struct Sargs Sargs;
-typedef struct Schedq Schedq;
typedef struct Segment Segment;
typedef struct Session Session;
typedef struct Talarm Talarm;
@@ 501,9 500,9 @@ enum
NERR = 15,
NNOTE = 5,
- Nrq = 20,
- PriNormal = 10,
- PriRoot = 5,
+ Nrq = 20, /* number of scheduler priority levels */
+ PriNormal = 10, /* base priority for normal processes */
+ PriRoot = 5, /* base priority for root processes */
};
struct Proc
@@ 599,14 598,6 @@ struct Proc
PMMU;
};
-struct Schedq
-{
- Lock;
- Proc *head;
- Proc *tail;
- int n;
-};
-
enum
{
PRINTSIZE = 256,
M port/proc.c => port/proc.c +7 -0
@@ 21,6 21,13 @@ struct
Waitq *free;
}waitqalloc;
+typedef struct
+{
+ Lock;
+ Proc *head;
+ Proc *tail;
+ int n;
+} Schedq;
int nrdy;
int lastreadied;
M port/swap.c => port/swap.c +1 -1
@@ 123,7 123,7 @@ loop:
/* don't swap out programs from devroot.c - they
* supply important system services
*/
- img = p->seg[SG_TEXT]->image;
+ img = p->seg[TSEG]->image;
if(img && devchar[img->c->type] == '/')
continue;