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 / src / io / trove / trove-dbpf / dbpf-sync.h < prev    next >
C/C++ Source or Header  |  2007-06-01  |  1KB  |  47 lines

  1. /*
  2.  * (C) 2002 Clemson University and The University of Chicago
  3.  *
  4.  * See COPYING in top-level directory.
  5.  */
  6.  
  7. #include "dbpf-op-queue.h"
  8. #include "gossip.h"
  9. #include "pint-perf-counter.h"
  10.  
  11. typedef struct
  12. {
  13.     int sync_counter;
  14.     /*
  15.      * Number of operations which are modifying, but are not marked with
  16.      * TROVE_Sync
  17.      */
  18.     int non_sync_counter;
  19.         
  20.     int coalesce_counter;
  21.     
  22.     gen_mutex_t mutex;
  23.     dbpf_op_queue_p sync_queue;
  24. } dbpf_sync_context_t;
  25.  
  26. int dbpf_sync_context_init(int context_index);
  27. void dbpf_sync_context_destroy(int context_index);
  28.  
  29. int dbpf_sync_coalesce(dbpf_queued_op_t *qop_p, int retcode, int * outcount);
  30. int dbpf_sync_coalesce_dequeue(dbpf_queued_op_t *qop_p);
  31. int dbpf_sync_coalesce_enqueue(dbpf_queued_op_t *qop_p);
  32.  
  33.  
  34. void dbpf_queued_op_set_sync_high_watermark(int high, struct dbpf_collection* coll);
  35. void dbpf_queued_op_set_sync_low_watermark(int low, struct dbpf_collection* coll);
  36.  
  37. void dbpf_queued_op_set_sync_mode(int enabled, struct dbpf_collection* coll);
  38.  
  39. /*
  40.  * Local variables:
  41.  *  c-indent-level: 4
  42.  *  c-basic-offset: 4
  43.  * End:
  44.  *
  45.  * vim: ts=8 sts=4 sw=4 expandtab
  46.  */ 
  47.