lib9pclient is the new libfs
This commit is contained in:
parent
5ba841dffa
commit
46f79934b7
16 changed files with 1033 additions and 0 deletions
47
src/lib9pclient/fsimpl.h
Normal file
47
src/lib9pclient/fsimpl.h
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
/* Copyright (C) 2003 Russ Cox, Massachusetts Institute of Technology */
|
||||
/* See COPYRIGHT */
|
||||
|
||||
#include <thread.h>
|
||||
|
||||
typedef struct Queue Queue;
|
||||
Queue *_fsqalloc(void);
|
||||
int _fsqsend(Queue*, void*);
|
||||
void *_fsqrecv(Queue*);
|
||||
void _fsqhangup(Queue*);
|
||||
void *_fsnbqrecv(Queue*);
|
||||
|
||||
#include <mux.h>
|
||||
struct CFsys
|
||||
{
|
||||
char version[20];
|
||||
int msize;
|
||||
QLock lk;
|
||||
int fd;
|
||||
int ref;
|
||||
Mux mux;
|
||||
CFid *root;
|
||||
Queue *txq;
|
||||
Queue *rxq;
|
||||
CFid *freefid;
|
||||
int nextfid;
|
||||
Ioproc *iorecv;
|
||||
Ioproc *iosend;
|
||||
};
|
||||
|
||||
struct CFid
|
||||
{
|
||||
int fid;
|
||||
int mode;
|
||||
CFid *next;
|
||||
QLock lk;
|
||||
CFsys *fs;
|
||||
Qid qid;
|
||||
vlong offset;
|
||||
};
|
||||
|
||||
void _fsdecref(CFsys*);
|
||||
void _fsputfid(CFid*);
|
||||
CFid *_fsgetfid(CFsys*);
|
||||
|
||||
int _fsrpc(CFsys*, Fcall*, Fcall*, void**);
|
||||
CFid *_fswalk(CFid*, char*);
|
||||
Loading…
Add table
Add a link
Reference in a new issue