remove ancient syssem entry points. Reference: /n/atom/patch/applied/rmsyssem Date: Thu Jun 12 03:33:47 CES 2014 Signed-off-by: quanstro@quanstro.net # rm /sys/src/nix/port/syssem.c --- /sys/src/nix/port/image.c Thu Jun 12 03:33:17 2014 +++ /sys/src/nix/port/image.c Thu Jun 12 03:33:19 2014 @@ -139,7 +139,6 @@ eqqid(c->mqid, i->mqid) && c->mchan == i->mchan && c->dev->dc == i->dc) { -//subtype goto found; } unlock(i); @@ -161,7 +160,6 @@ incref(c); i->c = c; i->dc = c->dev->dc; -//subtype i->qid = c->qid; i->mqid = c->mqid; i->mchan = c->mchan; --- /sys/src/nix/port/portdat.h Thu Jun 12 03:33:23 2014 +++ /sys/src/nix/port/portdat.h Thu Jun 12 03:33:26 2014 @@ -46,9 +46,7 @@ typedef struct Sched Sched; typedef struct Schedq Schedq; typedef struct Segment Segment; -typedef struct Sem Sem; typedef struct Sema Sema; -typedef struct Sems Sems; typedef struct Timer Timer; typedef struct Timers Timers; typedef struct Uart Uart; @@ -387,7 +385,6 @@ Qid mqid; Chan *mchan; int dc; /* Device type of owning channel */ -//subtype Segment *s; /* TEXT segment for image if running */ Image *hash; /* Qid hash chains */ Image *next; /* Free list or lru list */ @@ -454,23 +451,6 @@ Sema* prev; }; -/* NIX semaphores */ -struct Sem -{ - Lock; - int* np; /* user-level semaphore */ - Proc** q; - int nq; - Sem* next; /* in list of semaphores for this Segment */ -}; - -/* NIX semaphores */ -struct Sems -{ - Sem** s; - int ns; -}; - #define NOCOLOR -1 struct Segment @@ -497,7 +477,6 @@ Pte *ssegmap[SSEGMAPSIZE]; Lock semalock; Sema sema; - Sems sems; }; enum @@ -845,9 +824,6 @@ int fcount; char* syscalltrace; - - /* NIX */ - Sem *waitsem; uint ntrap; /* # of traps while in this process */ uint nintr; /* # of intrs while in this process */ --- /sys/src/nix/port/portfns.h Thu Jun 12 03:33:29 2014 +++ /sys/src/nix/port/portfns.h Thu Jun 12 03:33:30 2014 @@ -324,7 +324,6 @@ long seconds(void); Segment* seg(Proc*, uintptr, int); void segclock(uintptr); -Sem* segmksem(Segment*, int*); void segpage(Segment*, Page*); uintmem segppn(Segment*, uintmem); char* seprintpagestats(char*, char*); --- /sys/src/nix/port/segment.c Thu Jun 12 03:33:32 2014 +++ /sys/src/nix/port/segment.c Thu Jun 12 03:33:33 2014 @@ -94,26 +94,6 @@ #define NHASH 101 #define SHASH(np) (PTR2UINT(np)%NHASH) -Sem* -segmksem(Segment *sg, int *np) -{ - Sem *s, **l; - - qlock(&sg->lk); - if(sg->sems.s == nil) - sg->sems.s = mallocz(NHASH * sizeof(Sem*), 1); - for(l = &sg->sems.s[SHASH(np)]; (s = *l) != nil; l = &s->next) - if(s->np == np){ - qunlock(&sg->lk); - return s; - } - s = mallocz(sizeof *s, 1); - s->np = np; - *l = s; - qunlock(&sg->lk); - return s; -} - void putseg(Segment *s) { @@ -156,8 +136,6 @@ free(s->map); if(s->profile != 0) free(s->profile); - if(s->sems.s != nil) - free(s->sems.s); free(s); }