]> git.cworth.org Git - fips/blobdiff - context.h
Push oustanding-counter data down from context.c into metrics.c
[fips] / context.h
index ded22027f075892a12df33ab5f109d33c09f3c37..6ad357fd724aa958f9f6caf8e165ef796bf253fc 100644 (file)
--- a/context.h
+++ b/context.h
 #ifndef CONTEXT_H
 #define CONTEXT_H
 
+#include "metrics.h"
+#include "metrics-info.h"
+
 #include "fips-dispatch.h"
 
-/* Inidcate that a new context has come into use.
+typedef struct context
+{
+       /* Pointer to the system's context ID, (such as a GLXContext) */
+       void *system_id;
+
+       metrics_info_t metrics_info;
+       metrics_t metrics;
+} context_t;
+
+/* Indicate that a new context has come into use.
  *
  * Here, 'system_context_id' is a pointer to a system context (such as
  * a GLXContext) which fips can use to map to persistent contex_t
@@ -41,4 +53,8 @@ context_enter (fips_api_t api, void *system_context_id);
 void
 context_leave (void);
 
+/* Get the current context. */
+context_t *
+context_get_current (void);
+
 #endif