]> git.cworth.org Git - fips/blobdiff - context.h
metrics: Move the create/fini/destroy functions to the top of file.
[fips] / context.h
index ded22027f075892a12df33ab5f109d33c09f3c37..1fddf2e93e289d825b56ad157322563302e7e811 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