PUFFS_CC(3)             NetBSD Library Functions Manual            PUFFS_CC(3)

NAME
     puffs_cc -- puffs continuation routines

LIBRARY
     puffs Convenience Library (libpuffs, -lpuffs)

SYNOPSIS
     #include <puffs.h>

     void
     puffs_cc_yield(struct puffs_cc *pcc);

     void
     puffs_cc_continue(struct puffs_cc *pcc);

     void
     puffs_cc_schedule(struct puffs_cc *pcc);

     struct puffs_cc *
     puffs_cc_getcc(struct puffs_usermount *pu);

     void *
     puffs_docc(void *arg);

DESCRIPTION
     IMPORTANT NOTE! This document describes interfaces which are not yet
     guaranteed to be stable.  In case you update your system sources, please
     recompile everything and fix compilation errors.  If your sources are
     out-of-sync, incorrect operation may result.  The interfaces in this doc-
     ument will most likely be hugely simplified in later versions or made
     transparent to the implementation.

     These routines are used for the cooperative multitasking suite present in
     puffs.

     puffs_cc_yield(pcc)
           Suspend and save the current execution context and return control
           to the previous point.  In practice, from the file system author
           perspective, control returns back to where either puffs_dopufbuf()
           or puffs_docc() was called.

     puffs_cc_continue(pcc)
           Will suspend current execution and return control to where it was
           before before calling puffs_cc_yield().  This is rarely called
           directly but rather through puffs_docc().

     puffs_cc_schedule(pcc)
           Schedule a continuation.  As opposed to puffs_cc_continue() this
           call returns immediately.  pcc will be scheduled sometime in the
           future.

     puffs_cc_getcc(pu)
           Returns the current pcc or NULL if this is the main thread.  NOTE:
           The argument pu will most likely disappear at some point.

     puffs_docc(arg)
           Continues request suspended with puffs_cc_yield().  If the request
           completes without yielding again, the result is put into the file
           server response queue.

           The argument must be of type struct puffs_cc *.  The return value
           is ignored.  The signature of this function is intended to match
           start_routine() of pthread_create().

     Before calling puffs_cc_yield() a file system will typically want to
     record some cookie value into its own internal bookkeeping.  This cookie
     should be hooked to the pcc so that the correct continuation can be con-
     tinued when the event it was waiting for triggers.  Alternatively, the
     puffs_framebuf(3) framework can be used for handling this automatically.

SEE ALSO
     puffs(3), puffs_framebuf(3)

NetBSD 4.0                     December 15, 2007                    NetBSD 4.0

You can also request any man page by name and (optionally) by section:

Command: 
Section: 
Architecture: 
Collection: 
 

Use the DEFAULT collection to view manual pages for third-party software.


©1994 Man-cgi 1.15, Panagiotis Christias <christia@softlab.ntua.gr>
©1996-2008 Modified for NetBSD by Kimmo Suominen