📄 tls.h
字号:
#ifndef _tls_h_
#define _tls_h_
#include "drvegl.h"
#include "servicesglue.h"
/* If you wish to add a new thread with its own TLS, add it here */
struct tls_tag
{
/* user count for this TLS, should never exceed 1 */
EGLint count;
/* The last EGL non EGL_SUCCESS error code returned by an EGL API call */
EGLint lastError;
EGLSurface currentReadSurface;
EGLSurface currentDrawSurface;
EGLContext currentContext;
GLESSysContext servicesContext;
EGLint dpyCount;
KEGL_DISPLAY *dpys;
};
typedef struct tls_tag *TLS;
/*----------------------------------------------------------------------------*/
/* Functions for use by EGL only */
/*
<function>
FUNCTION : EGLGetTLSValue ()
PURPOSE : Retrieves EGL's value from thread local storage
PARAMETERS : None
RETURNS : IMG_TRUE, if successful
</function>
*/
IMG_VOID *
EGLGetTLSValue (IMG_VOID);
/*
<function>
FUNCTION : EGLSetTLSValue ()
PURPOSE : Sets EGL's value in thread local storage
PARAMETERS : pvA - Pointer to the value to set
RETURNS : IMG_TRUE, if successful
</function>
*/
IMG_BOOL
EGLSetTLSValue (IMG_VOID *pvA);
/*
<function>
FUNCTION : TLS_Open ()
PURPOSE : Open the thread local storage, when all openers have closed,
thread local storage is deallocated.
PARAMETERS : In: init - Initialise TLS structure.
RETURNS : Pointer to this threads local storage structure.
</function>
*/
TLS
TLS_Open (EGLBoolean (*init) (TLS tls));
/*
<function>
FUNCTION : TLS_Close ()
PURPOSE : Close the thread local storage, when all openers have closed,
thread local storage is deallocated.
PARAMETERS : None.
RETURNS : Pointer to this threads local storage structure.
</function>
*/
void
TLS_Close (void);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -