X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=context.h;h=6ad357fd724aa958f9f6caf8e165ef796bf253fc;hb=43fa296375ee35d811b7fed4537312ce9d08feac;hp=ded22027f075892a12df33ab5f109d33c09f3c37;hpb=bc106316b96ce7bfdbec3ee54ba37e49f156dea5;p=fips diff --git a/context.h b/context.h index ded2202..6ad357f 100644 --- a/context.h +++ b/context.h @@ -22,9 +22,21 @@ #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