summaryrefslogtreecommitdiffstats
path: root/src/VBox/HostServices/SharedOpenGL/dlm/dlm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/HostServices/SharedOpenGL/dlm/dlm.h')
-rw-r--r--src/VBox/HostServices/SharedOpenGL/dlm/dlm.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/VBox/HostServices/SharedOpenGL/dlm/dlm.h b/src/VBox/HostServices/SharedOpenGL/dlm/dlm.h
new file mode 100644
index 00000000..2e6db46e
--- /dev/null
+++ b/src/VBox/HostServices/SharedOpenGL/dlm/dlm.h
@@ -0,0 +1,31 @@
+/* $Id: dlm.h $ */
+
+#ifndef _DLM_H
+#define _DLM_H
+
+#include "cr_dlm.h"
+#include "cr_spu.h"
+
+#ifdef CHROMIUM_THREADSAFE
+#define DLM_LOCK(dlm) crLockMutex(&(dlm->dlMutex));
+#define DLM_UNLOCK(dlm) crUnlockMutex(&(dlm->dlMutex));
+extern CRtsd CRDLMTSDKey;
+#define SET_CURRENT_STATE(state) crSetTSD(&CRDLMTSDKey, (void *)state);
+#define CURRENT_STATE() ((CRDLMContextState *)crGetTSD(&CRDLMTSDKey))
+#else
+#define DLM_LOCK(dlm)
+#define DLM_UNLOCK(dlm)
+extern CRDLMContextState *CRDLMCurrentState;
+#define SET_CURRENT_STATE(state) CRDLMCurrentState = (state);
+#define CURRENT_STATE() (CRDLMCurrentState)
+#endif
+
+/* These routines are intended to be used within the DLM library, across
+ * the modules therein, but not as an API into the DLM library from
+ * outside.
+ */
+extern void crdlmWarning( int line, char *file, GLenum error, char *format, ... );
+extern void crdlmFreeDisplayListResourcesCb(void *pParm1, void *pParam2);
+extern void crdlm_error(int line, const char *file, GLenum error, const char *info);
+
+#endif