---
name: "SDL_DestroySemaphore"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_DestroySemaphore"
---

# SDL\_DestroySemaphore(3)

Destroy a semaphore.

## NAME

SDL\_DestroySemaphore - Destroy a semaphore.

## HEADER FILE

Defined in SDL3/SDL\_mutex.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**void SDL\_DestroySemaphore(SDL\_Semaphore \*sem);**

## DESCRIPTION

It is not safe to destroy a semaphore if there are threads currently waiting on it.

## FUNCTION PARAMETERS

- *sem*

  the semaphore to destroy.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_CreateSemaphore**(3)](/SDL_CreateSemaphore/3.md)
