X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=bluesky%2Fbluesky.h;h=ae751fdab6307fdba2dfe399dc7d3bc7a893554d;hb=75aed7ed122b11bbbe3814b6cc9bbacbf5d791c1;hp=fd0b6104a72c6779bae198de3996104f2192d7ae;hpb=43b95b084f95a57e6a08ab986037c4d3a72d2052;p=bluesky.git diff --git a/bluesky/bluesky.h b/bluesky/bluesky.h index fd0b610..ae751fd 100644 --- a/bluesky/bluesky.h +++ b/bluesky/bluesky.h @@ -10,6 +10,7 @@ #define _BLUESKY_H #include +#include #include #include @@ -289,6 +290,9 @@ typedef struct { /* Symlink-specific fields */ gchar *symlink_contents; + + /* A field for short-term use internally while the lock is held. */ + gpointer private_data; } BlueSkyInode; /* A directory entry. The name is UTF-8 and is a freshly-allocated string. @@ -363,6 +367,22 @@ void bluesky_flushd_thread_launch(BlueSkyFS *fs); void bluesky_debug_dump(BlueSkyFS *fs); +/* Request response time tracking. */ +typedef struct BlueSkyProfile { + int magic; + GMutex *lock; + char *description; + GList *events; +} BlueSkyProfile; + +BlueSkyProfile *bluesky_profile_new(); +void bluesky_profile_free(BlueSkyProfile *profile); +void bluesky_profile_add_event(BlueSkyProfile *profile, char *message); +void bluesky_profile_print(BlueSkyProfile *profile); +BlueSkyProfile *bluesky_profile_get(); +void bluesky_profile_set(BlueSkyProfile *profile); +void bluesky_profile_set_output(FILE *stream); + #ifdef __cplusplus } #endif