[BACK]Return to puffs_priv.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libpuffs

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libpuffs/puffs_priv.h between version 1.9 and 1.10

version 1.9, 2007/05/11 21:27:13 version 1.10, 2007/05/15 13:44:47
Line 40 
Line 40 
 #define PU_CMAP(pu, c)  (pu->pu_cmap ? pu->pu_cmap(c) : (struct puffs_node *)c)  #define PU_CMAP(pu, c)  (pu->pu_cmap ? pu->pu_cmap(c) : (struct puffs_node *)c)
   
 struct puffs_framectrl {  struct puffs_framectrl {
         puffs_framebuf_readframe_fn rfb;          puffs_framev_readframe_fn rfb;
         puffs_framebuf_writeframe_fn wfb;          puffs_framev_writeframe_fn wfb;
         puffs_framebuf_respcmp_fn cmpfb;          puffs_framev_respcmp_fn cmpfb;
         puffs_framebuf_loop_fn lfb;          puffs_framev_fdnotify_fn fdnotfn;
   
         struct kevent *evs;          struct kevent *evs;
         struct kevent *ch_evs;  
         size_t nfds;          size_t nfds;
   
           struct timespec timeout;
           struct timespec *timp;
   
         LIST_HEAD(, puffs_fctrl_io) fb_ios;          LIST_HEAD(, puffs_fctrl_io) fb_ios;
           LIST_HEAD(, puffs_fctrl_io) fb_ios_rmlist;
 };  };
   
 struct puffs_fctrl_io {  struct puffs_fctrl_io {
         int io_fd;          int io_fd;
         int wrstat;          int stat;
   
         struct puffs_framebuf *cur_in;          struct puffs_framebuf *cur_in;
   
Line 63  struct puffs_fctrl_io {
Line 66  struct puffs_fctrl_io {
   
         LIST_ENTRY(puffs_fctrl_io) fio_entries;          LIST_ENTRY(puffs_fctrl_io) fio_entries;
 };  };
 #define FIO_EN_WRITE(fio) (fio->wrstat == 0 && !TAILQ_EMPTY(&fio->snd_qing))  #define FIO_WR          0x01
 #define FIO_RM_WRITE(fio) (fio->wrstat == 1 && TAILQ_EMPTY(&fio->snd_qing))  #define FIO_WRGONE      0x02
   #define FIO_RDGONE      0x04
   #define FIO_DEAD        0x08
   
   #define FIO_EN_WRITE(fio) (!(fio->stat & FIO_WR)&& !TAILQ_EMPTY(&fio->snd_qing))
   #define FIO_RM_WRITE(fio) ((fio->stat & FIO_WR) && TAILQ_EMPTY(&fio->snd_qing))
   
 /*  /*
  * usermount: describes one file system instance   * usermount: describes one file system instance
Line 81  struct puffs_usermount {
Line 89  struct puffs_usermount {
         int                     pu_state;          int                     pu_state;
 #define PU_STATEMASK    0xff  #define PU_STATEMASK    0xff
 #define PU_INLOOP       0x100  #define PU_INLOOP       0x100
   #define PU_ASYNCFD      0x200
 #define PU_SETSTATE(pu, s) (pu->pu_state = (s) | (pu->pu_state & ~PU_STATEMASK))  #define PU_SETSTATE(pu, s) (pu->pu_state = (s) | (pu->pu_state & ~PU_STATEMASK))
   
         struct puffs_node       *pu_pn_root;          struct puffs_node       *pu_pn_root;
   
         LIST_HEAD(, puffs_node) pu_pnodelst;          LIST_HEAD(, puffs_node) pu_pnodelst;
           LIST_HEAD(, puffs_cc)   pu_ccnukelst;
   
         struct puffs_node       *(*pu_cmap)(void *);          struct puffs_node       *(*pu_cmap)(void *);
   
Line 97  struct puffs_usermount {
Line 107  struct puffs_usermount {
   
         struct puffs_framectrl  pu_framectrl;          struct puffs_framectrl  pu_framectrl;
   
         void    *pu_privdata;          puffs_ml_loop_fn        pu_ml_lfn;
           struct timespec         pu_ml_timeout;
           struct timespec         *pu_ml_timep;
   
           void                    *pu_privdata;
 };  };
   
 /* call context */  /* call context */
Line 111  struct puffs_cc {
Line 125  struct puffs_cc {
         void                    *pcc_stack;          void                    *pcc_stack;
   
         int                     pcc_flags;          int                     pcc_flags;
           struct puffs_putreq     *pcc_ppr;
         /* these are for threading information to the implementation    */  
         void                    *pcc_priv;  
         int                     pcc_rv;  
   
         TAILQ_ENTRY(puffs_cc)   entries;          TAILQ_ENTRY(puffs_cc)   entries;
           LIST_ENTRY(puffs_cc)    nlst_entries;
 };  };
 #define PCC_FAKECC      0x01  #define PCC_FAKECC      0x01
 #define PCC_REALCC      0x02  #define PCC_REALCC      0x02
 #define PCC_FREEPRIV    0x04  #define PCC_DONE        0x04
 #define PCC_PREQ_NOCOPY 0x08  #define PCC_BORROWED    0x08
 #define PCC_DONE        0x10  
   
 #define PCC_CALL_NONE   0x10000  
 #define PCC_CALL_IN     0x20000  
 #define PCC_CALL_OUT    0x40000  
 #define PCC_CALL_MASK   0x70000  
   
 #define pcc_callstat(a)    (a->pcc_flags & PCC_CALL_MASK)  #define pcc_callstat(a)    (a->pcc_flags & PCC_CALL_MASK)
 #define pcc_callset(a, b)  (a->pcc_flags = (a->pcc_flags & ~PCC_CALL_MASK) | b)  #define pcc_callset(a, b)  (a->pcc_flags = (a->pcc_flags & ~PCC_CALL_MASK) | b)
Line 177  __BEGIN_DECLS
Line 183  __BEGIN_DECLS
   
 void    puffs_calldispatcher(struct puffs_cc *);  void    puffs_calldispatcher(struct puffs_cc *);
   
 int     puffs_framebuf_input(struct puffs_usermount *, struct puffs_framectrl *,  void    puffs_framev_input(struct puffs_usermount *, struct puffs_framectrl *,
                              struct puffs_fctrl_io *, struct puffs_putreq *);                             struct puffs_fctrl_io *, struct puffs_putreq *);
 int     puffs_framebuf_output(struct puffs_usermount *, struct puffs_framectrl*,  int     puffs_framev_output(struct puffs_usermount *, struct puffs_framectrl*,
                               struct puffs_fctrl_io *);                              struct puffs_fctrl_io *);
 void    puffs_framebuf_exit(struct puffs_usermount *);  void    puffs_framev_exit(struct puffs_usermount *);
   void    puffs_framev_readclose(struct puffs_usermount *,
                                  struct puffs_fctrl_io *, int);
   void    puffs_framev_writeclose(struct puffs_usermount *,
                                   struct puffs_fctrl_io *, int);
   
   void    puffs_goto(struct puffs_cc *);
   
 __END_DECLS  __END_DECLS
   

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

CVSweb <webmaster@jp.NetBSD.org>