eglDestroySync - EGL Reference Pages

## Name

eglDestroySync — Destroy a sync object

## C Specification

`EGLBoolean eglDestroySync(` | (EGLDisplay display,
| EGLSync sync`)`;

## Parameters

`display`

  Specifies the EGL display connection.

`sync`

  Specifies the sync object to destroy.

## Description

`eglDestroySync` is used to destroy an existing sync object.

If any `eglClientWaitSync` or `eglWaitSync` commands are blocking on `sync` when `eglDestroySync` is called, `sync` is flagged for deletion and will be deleted when the associated fence command or OpenCL event object has completed, and `sync` is no longer blocking any such `egl*WaitSync` command. Otherwise, the sync object is destroyed immediately.

If no errors are generated, `EGL_TRUE` is returned, and `sync` will no longer be the handle of a valid sync object.

## Errors

On failure, `eglDestroySync` returns `EGL_FALSE`.

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

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

## Notes

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

## See Also

eglClientWaitSync, eglCreateSync, eglWaitSync

Copyright © 2003-2014 The Khronos Group Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the condition that this copyright notice and permission notice shall be included in all copies or substantial portions of the Materials.