aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglglobals.h
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2009-08-10 17:35:20 +0800
committerBrian Paul <[email protected]>2009-08-11 22:14:35 -0600
commit435c7ac24d8d6f8ddae59f4b66983d7642250d1e (patch)
tree1ff9c207c6ef065081a28a4844f64d1445c8dae7 /src/egl/main/eglglobals.h
parent0e3687e33dd482115c1a0e39c50b424936cb05a6 (diff)
egl: Add _eglAddAtExitCall.
Add a convenient wrapper to register atexit calls. Add mutex to _eglGlobal along the way. Signed-off-by: Chia-I Wu <[email protected]>
Diffstat (limited to 'src/egl/main/eglglobals.h')
-rw-r--r--src/egl/main/eglglobals.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/egl/main/eglglobals.h b/src/egl/main/eglglobals.h
index 2f3c211476f..1e2c6742630 100644
--- a/src/egl/main/eglglobals.h
+++ b/src/egl/main/eglglobals.h
@@ -4,6 +4,7 @@
#include "egltypedefs.h"
#include "eglhash.h"
#include "eglcurrent.h"
+#include "eglmutex.h"
/**
@@ -11,6 +12,7 @@
*/
struct _egl_global
{
+ _EGLMutex *Mutex;
EGLScreenMESA FreeScreenHandle;
/* bitmaks of supported APIs (supported by _some_ driver) */
@@ -20,10 +22,17 @@ struct _egl_global
EGLint NumDrivers;
_EGLDriver *Drivers[10];
+
+ EGLint NumAtExitCalls;
+ void (*AtExitCalls[10])(void);
};
extern struct _egl_global _eglGlobal;
+extern void
+_eglAddAtExitCall(void (*func)(void));
+
+
#endif /* EGLGLOBALS_INCLUDED */