Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

puffs_cc(3) [netbsd man page]

PUFFS_CC(3)						   BSD 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); DESCRIPTION
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 per- spective, control returns back to where either the mainloop or where puffs_dispatch_exec() was called from. 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_dispatch_exec(). 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. 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 continued when the event it was waiting for triggers. Alternatively, the puffs_framebuf(3) framework and puffs_mainloop() can be used for handling this automatically. SEE ALSO
puffs(3), puffs_framebuf(3) BSD
January 28, 2008 BSD

Check Out this Related Man Page

PUFFS_PATH(3)						   BSD Library Functions Manual 					     PUFFS_PATH(3)

NAME
puffs_path -- puffs pathbuilding routines LIBRARY
puffs Convenience Library (libpuffs, -lpuffs) SYNOPSIS
#include <puffs.h> int pu_pathbuild_fn(struct puffs_usermount *pu, const struct puffs_pathobj *po_dir, const struct puffs_pathobj *po_comp, size_t offset, struct puffs_pathobj *po_new); int pu_pathtransform_fn(struct puffs_usermount *pu, const struct puffs_pathobj *po_base, const struct puffs_cn *pcn, struct puffs_pathobj *po_new); int pu_pathcmp_fn(struct puffs_usermount *pu, struct puffs_pathobj *po1, struct puffs_pathobj *po2, size_t checklen, int checkprefix); void pu_pathfree_fn(struct puffs_usermount *pu, struct puffs_pathobj *po); int pu_namemod_fn(struct puffs_usermount *pu, struct puffs_pathobj *po_dir, struct puffs_cn *pcn); struct puffs_pathobj * puffs_getrootpathobj(struct puffs_usermount *pu); DESCRIPTION
The puffs library has the ability to provide full pathnames for backends which require them. Normal file systems should be constructed with- out the file system node tied to a file name and should not used routines described herein. An example of a file system where the backend requires filenames is mount_psshfs(8). The features described here are enabled by passing PUFFS_FLAG_BUILDPATH to puffs_init(). This facility requires to use puffs nodes to store the contents of the pathname. Either the address of the operation cookie must directly be that of the puffs node, or puffs_set_cmap() must be used to set a mapping function from the cookie to the puffs node associated with the cookie. Finally, the root node for the file system must be set using puffs_setroot() and the root path object retrieved using puffs_getrootpathobj() and initialized. There are two different places a filename can be retrieved from. It is available for each puffs node after the node has been registered with the framework, i.e. after the routine creating the node returns. In other words, there is a window between the node is created and when the pathname is available and multithreaded file systems must take this into account. The second place where a pathname is available is from the componentname struct puffs_pcn in operations which are passed one. These can be retrieved using the convenience macros PNPATH() and PCNPATH() for node and componentname, respectively. The type of object they return is void *. By default the framework manages "regular" filenames, which consist of directory names separated by "/" and a final component. If the file system wishes to use pathnames of this format, all it has to do it enable the feature. Everything else, including bookkeeping for node and directory renames, is done by the library. The callback routines described next provide the ability to build non-standard pathnames. A pu_foo_fn() callback is set using the puffs_set_foo() routine. This manual page is still unfinished. Please take a number and wait in line. SEE ALSO
puffs(3), puffs_node(3), mount_psshfs(8), mount_sysctlfs(8) BSD
December 27, 2007 BSD
Man Page