2018 The Khronos Group Inc.
eglGetSyncAttrib 3G
eglGetSyncAttrib Return an attribute of a sync object

## C Specification

EGLBoolean `eglGetSyncAttrib` (EGLDisplay display EGLSync sync EGLint attribute EGLAttrib *value

## Parameters

display

  Specifies the EGL display connection.

sync

  Specifies the sync object to query.

attribute

  Specifies the EGL sync object attribute to query.

value

  Returns the requested attribute value.

## Description

`eglGetSyncAttrib` is used to query attributes of the sync object sync. Legal values for attribute depend on the type of sync object, as shown in table . Assuming no errors are generated, `EGL_TRUE` is returned and the value of the queried attribute is returned in *value.

Attributes accepted by `eglGetSyncAttrib`

Attribute | Description | Supported Sync Objects
--- | --- | ---
Attribute | Description | Supported Sync Objects
`EGL_SYNC_TYPE` | Type of the sync object | All
`EGL_SYNC_STATUS` | Status of the sync object | All
`EGL_SYNC_CONDITION` | Signaling condition | `EGL_SYNC_FENCE` or `EGL_SYNC_CL_EVENT`

## Errors

On failure, `eglGetSyncAttrib` returns `EGL_FALSE` and *value is not modified.

If sync is not a valid sync object for display, an `EGL_BAD_PARAMETER` error is generated.

If attribute is not one of the attributes in table , an `EGL_BAD_ATTRIBUTE` error is generated.

If attribute is not supported for the type of sync object passed in sync, an `EGL_BAD_MATCH` error is generated.

If display does not match the display passed to `eglCreateSync` when sync was created, behaviour is undefined.

## Notes

`eglGetSyncAttrib` is available only if the EGL version is 1.5 or greater.

## See Also

eglCreateSync