Blob
1 /* Copyright (C) 2003 Russ Cox, Massachusetts Institute of Technology */2 /* See COPYRIGHT */4 #include <thread.h>6 typedef struct Queue Queue;7 Queue *_fsqalloc(void);8 int _fsqsend(Queue*, void*);9 void *_fsqrecv(Queue*);10 void _fsqhangup(Queue*);11 void *_fsnbqrecv(Queue*);13 #include <mux.h>14 struct CFsys15 {16 char version[20];17 int msize;18 QLock lk;19 int fd;20 int ref;21 Mux mux;22 CFid *root;23 Queue *txq;24 Queue *rxq;25 CFid *freefid;26 int nextfid;27 Ioproc *iorecv;28 Ioproc *iosend;29 };31 struct CFid32 {33 int fid;34 int mode;35 CFid *next;36 QLock lk;37 CFsys *fs;38 Qid qid;39 vlong offset;40 };42 void _fsdecref(CFsys*);43 void _fsputfid(CFid*);44 CFid *_fsgetfid(CFsys*);46 int _fsrpc(CFsys*, Fcall*, Fcall*, void**);47 CFid *_fswalk(CFid*, char*);