| plan 9 kernel history: overview | file list | diff list |
port/stfcall.c (diff list | history)
| 1991/0521/sys/src/9/port/stfcall.c:7,13 – 1991/0522/sys/src/9/port/stfcall.c:7,13 (short | long) | ||
| 1991/0521 | #include "fcall.h" | |
| 1991/0522 | #define DPRINT if(fcalldebug)print | |
| 1991/0521 | int fcalldebug = 0; | |
| 1991/0522/sys/src/9/port/stfcall.c:7,13 – 1991/1003/sys/src/9/port/stfcall.c:7,13 (short | long) | ||
| 1991/0521 | #include "fcall.h" | |
| 1991/0522 |
| |
| 1991/1003 | #define DPRINT if(fcalldebug)kprint | |
| 1991/0521 | int fcalldebug = 0; | |
| 1991/0522/sys/src/9/port/stfcall.c:52,58 – 1991/1003/sys/src/9/port/stfcall.c:52,58 | ||
| 1991/0521 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 0, 67, 5, 3, 89, 13, 7, 5, 33, 13, 6, 13, 38, 13, 15, 8, 16, 7, 5, 5, 5, 5, 5,121,121, 5, | |
| 1991/1003 | 35, 13, 69, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
| 1991/0521 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
| 1991/1003/sys/src/9/port/stfcall.c:3,9 – 1992/0111/sys/src/9/port/stfcall.c:3,9 (short | long) | ||
|
Move error.h to ../port. Change errors to actual strings.
rsc Fri Mar 4 12:44:25 2005 | ||
| 1991/0521 | #include "mem.h" #include "dat.h" #include "fns.h" | |
| 1992/0111 | #include "../port/error.h" | |
| 1991/0521 | #include "fcall.h" | |
| 1992/0111/sys/src/9/port/stfcall.c:7,97 – 1992/0318/sys/src/9/port/stfcall.c:7,80 (short | long) | ||
| 1991/0521 | #include "fcall.h" | |
| 1991/1003 |
| |
| 1991/0521 |
| |
| 1992/0318 | enum { Twritehdr = 15, /* Min bytes for Twrite */ Rreadhdr = 8, /* Min bytes for Rread */ Twritecnt = 13, /* Offset in byte stream of write count */ Rreadcnt = 5, /* Offset for Readcnt */ | |
| 1991/0521 | }; | |
| 1992/0318 | Qinfo fcallinfo = { fcalliput, fcalloput, fcallopen, fcallclose, "fcall", fcallreset }; static uchar msglen[256] = | |
| 1991/0521 | { | |
| 1992/0318 | [Tnop] 3, [Rnop] 3, [Tsession] 3, [Rsession] 3, [Terror] 0, [Rerror] 67, [Tflush] 5, [Rflush] 3, [Tattach] 89, [Rattach] 13, [Tclone] 7, [Rclone] 5, [Twalk] 33, [Rwalk] 13, [Topen] 6, [Ropen] 13, [Tcreate] 38, [Rcreate] 13, [Tread] 15, [Rread] 8, [Twrite] 16, [Rwrite] 7, [Tclunk] 5, [Rclunk] 5, [Tremove] 5, [Rremove] 5, [Tstat] 5, [Rstat] 121, [Twstat] 121, [Rwstat] 5, [Tclwalk] 35, [Rclwalk] 13, [Tauth] 69, [Rauth] 35, | |
| 1991/0521 | }; | |
| 1991/1003 |
| |
| 1991/0521 |
| |
| 1992/0318 | { } | |
| 1991/0521 | static void fcallopen(Queue *q, Stream *s) { | |
| 1992/0318 | USED(q, s); | |
| 1991/0521 | } static void fcallclose(Queue * q) { | |
| 1992/0318 | USED(q); | |
| 1991/0521 | } void | |
| 1992/0111/sys/src/9/port/stfcall.c:100,224 – 1992/0318/sys/src/9/port/stfcall.c:83,163 | ||
| 1991/0521 | PUTNEXT(q, bp); } | |
| 1992/0318 | void upstream(Queue *q, ulong len) { Block *bl, **tail, *bp; ulong l; | |
| 1991/0521 | ||
| 1992/0318 | tail = &bl; while(len) { l = BLEN(q->first); if(l > len) break; bp = getq(q); /* Consume all of block */ *tail = bp; tail = &bp->next; len -= l; } if(len) { /* Consume partial block */ lock(q); *tail = copyb(q->first, len); q->first->rptr += len; q->len -= len; unlock(q); } for(bp = bl; bp->next; bp = bp->next) ; bp->flags |= S_DELIM; PUTNEXT(q, bl); } | |
| 1991/0521 | static void fcalliput(Queue *q, Block *bp) { | |
| 1992/0318 | ulong len, need, off; | |
| 1991/0521 |
| |
| 1992/0318 | if(bp->type != M_DATA) { | |
| 1991/0521 | PUTNEXT(q, bp); return; } | |
| 1992/0318 | if(BLEN(bp) == 0) { | |
| 1991/0521 | freeb(bp); return; } | |
| 1992/0318 | /* Stash the data */ bp->flags &= ~S_DELIM; putq(q, bp); | |
| 1991/0521 |
| |
| 1992/0318 | bp = q->first; switch(bp->rptr[0]) { /* This is the type */ default: len = msglen[bp->rptr[0]]; if(len == 0) error(Emountrpc); if(q->len >= len) upstream(q, len); | |
| 1991/0521 |
| |
| 1992/0318 | return; case Twrite: /* Fmt: TGGFFOOOOOOOOCC */ len = Twritehdr; /* T = type, G = tag, F = fid */ off = Twritecnt; /* O = offset, C = count */ | |
| 1991/0521 | break; | |
| 1992/0318 | case Rread: /* Fmt: TGGFFCC */ len = Rreadhdr; off = Rreadcnt; break; | |
| 1991/0521 | } | |
| 1992/0318 | if(q->len < len) return; | |
| 1991/0521 |
| |
| 1992/0318 | pullup(q->first, len); bp = q->first; need = len+bp->rptr[off]+(bp->rptr[off+1]<<8); if(q->len < need) return; upstream(q, need); | |
| 1991/0521 | } | |
| 1992/0318/sys/src/9/port/stfcall.c:109,114 – 1992/0319/sys/src/9/port/stfcall.c:109,115 (short | long) | ||
| 1992/0318 | for(bp = bl; bp->next; bp = bp->next) ; bp->flags |= S_DELIM; | |
| 1992/0319 | if(bl->rptr[0] == 73) print("fcall Rclunk %d\n", blen(bl)); | |
| 1992/0318 | PUTNEXT(q, bl); } | |
| 1992/0319/sys/src/9/port/stfcall.c:109,115 – 1992/0320/sys/src/9/port/stfcall.c:109,114 (short | long) | ||
| 1992/0318 | for(bp = bl; bp->next; bp = bp->next) ; bp->flags |= S_DELIM; | |
| 1992/0319 |
| |
| 1992/0318 | PUTNEXT(q, bl); } | |
| 1992/0319/sys/src/9/port/stfcall.c:131,164 – 1992/0320/sys/src/9/port/stfcall.c:130,170 | ||
| 1992/0318 | bp->flags &= ~S_DELIM; putq(q, bp); | |
| 1991/0521 | ||
| 1992/0318 |
| |
| 1992/0320 | for(;;) { bp = q->first; if(bp == 0) return; switch(bp->rptr[0]) { /* This is the type */ default: len = msglen[bp->rptr[0]]; if(len == 0) error(Emountrpc); if(q->len < len) return; | |
| 1992/0318 | upstream(q, len); | |
| 1992/0320 | continue; | |
| 1991/0521 | ||
| 1992/0318 |
| |
| 1991/0521 |
| |
| 1992/0318 |
| |
| 1991/0521 |
| |
| 1992/0320 | case Twrite: /* Fmt: TGGFFOOOOOOOOCC */ len = Twritehdr; /* T = type, G = tag, F = fid */ off = Twritecnt; /* O = offset, C = count */ break; | |
| 1991/0521 | ||
| 1992/0318 |
| |
| 1991/0521 | ||
| 1992/0318 |
| |
| 1992/0320 | case Rread: /* Fmt: TGGFFCC */ len = Rreadhdr; off = Rreadcnt; break; } if(q->len < len) return; pullup(q->first, len); bp = q->first; need = len+bp->rptr[off]+(bp->rptr[off+1]<<8); if(q->len < need) return; upstream(q, need); } | |
| 1991/0521 | } | |
| 1992/0320/sys/src/9/port/stfcall.c:1,5 – 1992/0321/sys/src/9/port/stfcall.c:1,5 (short | long) | ||
|
Move lib.h to ../port.
rsc Fri Mar 4 12:44:25 2005 | ||
| 1991/0521 | #include "u.h" | |
| 1992/0321 | #include "../port/lib.h" | |
| 1991/0521 | #include "mem.h" #include "dat.h" #include "fns.h" | |
| 1992/0321/sys/src/9/port/stfcall.c:5,12 – 1992/0619/sys/src/9/port/stfcall.c:5,10 (short | long) | ||
| 1991/0521 | #include "fns.h" | |
| 1992/0111 | #include "../port/error.h" | |
| 1991/0521 |
| |
| 1992/0318 | enum { Twritehdr = 15, /* Min bytes for Twrite */ | |
| 1992/0619/sys/src/9/port/stfcall.c:7,13 – 1992/0910/sys/src/9/port/stfcall.c:7,13 (short | long) | ||
| 1991/0521 | ||
| 1992/0318 | enum { | |
| 1992/0910 | Twritehdr = 16, /* Min bytes for Twrite */ | |
| 1992/0318 | Rreadhdr = 8, /* Min bytes for Rread */ Twritecnt = 13, /* Offset in byte stream of write count */ Rreadcnt = 5, /* Offset for Readcnt */ | |
| 1992/0619/sys/src/9/port/stfcall.c:135,142 – 1992/0910/sys/src/9/port/stfcall.c:135,146 | ||
| 1992/0320 | switch(bp->rptr[0]) { /* This is the type */ default: len = msglen[bp->rptr[0]]; | |
| 1992/0910 | if(len == 0){ bp = allocb(0); bp->type = M_HANGUP; PUTNEXT(q, bp); return; } | |
| 1992/0320 | if(q->len < len) return; | |
| 1992/0910/sys/src/9/port/stfcall.c:24,37 – 1993/0330/sys/src/9/port/stfcall.c:24,37 (short | long) | ||
| 1991/0521 | { | |
| 1992/0318 | [Tnop] 3, [Rnop] 3, | |
| 1993/0330 | [Tsession] 3+CHALLEN, [Rsession] 3+NAMELEN+DOMLEN+CHALLEN, | |
| 1992/0318 | [Terror] 0, [Rerror] 67, [Tflush] 5, [Rflush] 3, | |
| 1993/0330 | [Tattach] 5+2*NAMELEN+TICKETLEN+AUTHENTLEN, [Rattach] 13+AUTHENTLEN, | |
| 1992/0318 | [Tclone] 7, [Rclone] 5, [Twalk] 33, | |
| 1992/0910/sys/src/9/port/stfcall.c:54,61 – 1993/0330/sys/src/9/port/stfcall.c:54,59 | ||
| 1992/0318 | [Rwstat] 5, [Tclwalk] 35, [Rclwalk] 13, | |
| 1991/0521 | }; static void | |
| 1993/0330/sys/src/9/port/stfcall.c:158,166 – 1993/0410/sys/src/9/port/stfcall.c:158,173 (short | long) | ||
| 1992/0320 | if(q->len < len) return; | |
| 1993/0410 | /* * the lock here is wrong. it should be a qlock since * the pullup may block. not worth fixing. */ lock(q); bp = q->first = pullup(q->first, len); if(bp == 0) q->len = 0; unlock(q); | |
| 1992/0320 | need = len+bp->rptr[off]+(bp->rptr[off+1]<<8); if(q->len < need) return; | |
| 1993/0410/sys/src/9/port/stfcall.c:24,37 – 1993/0501/sys/src/9/port/stfcall.c:24,37 (short | long) | ||
| 1991/0521 | { | |
| 1992/0318 | [Tnop] 3, [Rnop] 3, | |
| 1993/0330 |
| |
| 1993/0501 | [Tsession] 3, [Rsession] 3, | |
| 1992/0318 | [Terror] 0, [Rerror] 67, [Tflush] 5, [Rflush] 3, | |
| 1993/0330 |
| |
| 1993/0501 | [Tattach] 89, [Rattach] 13, | |
| 1992/0318 | [Tclone] 7, [Rclone] 5, [Twalk] 33, | |
| 1993/0410/sys/src/9/port/stfcall.c:54,59 – 1993/0501/sys/src/9/port/stfcall.c:54,61 | ||
| 1992/0318 | [Rwstat] 5, [Tclwalk] 35, [Rclwalk] 13, | |
| 1993/0501 | [Tauth] 69, [Rauth] 35, | |
| 1991/0521 | }; static void | |
| 1993/0410/sys/src/9/port/stfcall.c:158,173 – 1993/0501/sys/src/9/port/stfcall.c:160,168 | ||
| 1992/0320 | if(q->len < len) return; | |
| 1993/0410 |
| |
| 1993/0501 | pullup(q->first, len); bp = q->first; | |
| 1992/0320 | need = len+bp->rptr[off]+(bp->rptr[off+1]<<8); if(q->len < need) return; | |
| 1993/0501/sys/src/9/port/stfcall.c:1,172 – 1993/0804/sys/src/9/port/stfcall.c:0 (short | long) | ||
|
Deleted.
rsc Mon Mar 7 10:32:08 2005 | ||
| 1991/0521 |
| |
| 1992/0321 |
| |
| 1991/0521 |
| |
| 1992/0111 |
| |
| 1991/0521 | ||
| 1992/0318 |
| |
| 1992/0910 |
| |
| 1992/0318 |
| |
| 1991/0521 |
| |
| 1992/0318 |
| |
| 1991/0521 |
| |
| 1992/0318 |
| |
| 1993/0501 |
| |
| 1992/0318 |
| |
| 1993/0501 |
| |
| 1992/0318 |
| |
| 1993/0501 |
| |
| 1991/0521 |
| |
| 1992/0318 |
| |
| 1991/0521 |
| |
| 1992/0318 |
| |
| 1991/0521 |
| |
| 1992/0318 |
| |
| 1991/0521 |
| |
| 1992/0318 |
| |
| 1991/0521 | ||
| 1992/0318 |
| |
| 1991/0521 |
| |
| 1992/0318 |
| |
| 1991/0521 | ||
| 1992/0318 |
| |
| 1991/0521 |
| |
| 1992/0318 |
| |
| 1991/0521 |
| |
| 1992/0318 |
| |
| 1991/0521 | ||
| 1992/0320 |
| |
| 1992/0910 |
| |
| 1992/0320 |
| |
| 1992/0318 |
| |
| 1992/0320 |
| |
| 1991/0521 | ||
| 1992/0320 |
| |
| 1991/0521 | ||
| 1992/0320 |
| |
| 1993/0501 |
| |
| 1992/0320 |
| |
| 1991/0521 |
| |