summaryrefslogtreecommitdiffstats
path: root/src/VBox/HostServices/SharedOpenGL/dlm/dlm.h
blob: 2e6db46ead3e1907d8f378ab32b330ca3aedc4f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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