Track memory usage statistics for cached data.
[bluesky.git] / bluesky / bluesky-private.h
index 058c5bd..852b04e 100644 (file)
@@ -47,7 +47,8 @@ typedef enum {
 } BlueSkyAsyncStatus;
 
 struct BlueSkyNotifierList;
-typedef struct {
+typedef struct _BlueSkyStoreAsync BlueSkyStoreAsync;
+struct _BlueSkyStoreAsync {
     BlueSkyStore *store;
 
     GMutex *lock;
@@ -65,10 +66,15 @@ typedef struct {
     struct BlueSkyNotifierList *notifiers;
     gint notifier_count;
 
+    /* The barrier waiting on this operation.  Support for more than one
+     * barrier for a single async is not well-supported and should be avoided
+     * if possible. */
+    BlueSkyStoreAsync *barrier;
+
     bluesky_time_hires start_time;  /* Time operation was submitted. */
 
     gpointer store_private;     /* For use by the storage implementation */
-} BlueSkyStoreAsync;
+};
 
 /* Support for notification lists.  These are lists of one-shot functions which
  * can be called when certain events--primarily, competed storage