home *** CD-ROM | disk | FTP | other *** search
/ ftp.parl.clemson.edu / 2015-02-07.ftp.parl.clemson.edu.tar / ftp.parl.clemson.edu / pub / pvfs2 / orangefs-2.8.3-20110323.tar.gz / orangefs-2.8.3-20110323.tar / orangefs / doc / add-client-syscall < prev    next >
Text File  |  2005-07-21  |  1KB  |  37 lines

  1.  
  2. Step in adding a syscall to the client:
  3.  
  4. 1) write a state machine
  5.         src/clent/sysint/...
  6.         state machines should include the PVFS syscall and
  7.         and internal PVFS isyscall
  8.         Most SMs will utilize a message pair - a request to the server
  9.             and a response from the server.  A reusable SM can process
  10.             multiple concurrent message pairs: pvfs2_msgpairarray_sm
  11.             thus mostly the SM must set up the message pairs and 
  12.             process the results.
  13.                 There is both a msgpair and a msgarray field in the SM struct
  14.         State functions return 0 or 1 on error-free completion,
  15.            0 indicates an asynchronous call has been made and must be waited for
  16.             1 indicates no async call was made and should proceed to next state
  17.           <0 indicates an error - use PVFS_EXXX codes defined in
  18.                include/pvfs2-types.h
  19.  
  20. 2) add items to
  21.         include/pvfs2-sysint.h
  22.         add function prototypes for syscall and isyscall
  23.         add definition of system response struct (if needed)
  24.  
  25. 3) add items to
  26.         src/client/sysint/client-state-machine.h
  27.         add struct for syscall specific fields
  28.         add entry to union near bottom of file : struct PINT_client_sm
  29.         add enumeration item near bottom of file
  30.         add declarate of state machine function at bottom of file
  31.  
  32. 4) add entries to identify the state machine
  33.         src/client/sysint/client-state-machine.c
  34.         PINT_client_state_machine_post()
  35.         PINT_client_get_name_str()
  36.          
  37.