What' the meaning of snapshot-driven Which is seen in the comments of the code of xenomai-v3.1.

孙世龙 sunshilong369 at gmail.com
Tue Apr 21 07:40:43 CEST 2020


Hi,
      What' the meaning of snapshot-driven Which is seen in the comments of
the code of xenomai-v3.1.
      For your convenice, I list the related code below.
Very few useful information could be aquired  through the search engines.

      I have seen  many function names which contain the letters 'snapshot'
while i am browsing xenomai source code .
     I tried my best to understand it, but i fail.

     Thanks for your attention.
     Look forward to hearing from you.
 /**

 * @brief Vfile locking operations
 * @anchor vfile_lockops
 *
 * This structure describes the operations to be provided for
 * implementing locking support on vfiles. They apply to both
 * snapshot-driven and regular vfiles.
 */
struct xnvfile_lock_ops {
   /**
    * @anchor lockops_get
    * This handler should grab the desired lock.
    *
    * @param vfile A pointer to the virtual file which needs
    * locking.
    *
    * @return zero should be returned if the call
    * succeeds. Otherwise, a negative error code can be returned;
    * upon error, the current vfile operation is aborted, and the
    * user-space caller is passed back the error value.
    */
   int (*get)(struct xnvfile *vfile);
   /**
    * @anchor lockops_put This handler should release the lock
    * previously grabbed by the @ref lockops_get "get() handler".
    *
    * @param vfile A pointer to the virtual file which currently
    * holds the lock to release.
    */
   void (*put)(struct xnvfile *vfile);
};


More information about the Xenomai mailing list