---
name: "sg_unlock_mutex"
section: "3"
platform: "linux"
package: "libstatgrab"
version: "0.92.1-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/sg_unlock_mutex"
---

# sg\_unlock\_mutex(3)

guard not MT-safe system API

## NAME

sg\_lock\_mutex, sg\_unlock\_mutex - guard not MT-safe system API

## SYNOPSIS

```
FC#include <statgrab.h>F[0]
```

FCsg\_error **sg\_lock\_mutex**F\[0\]  FC(char const \**mutex\_name*);F\[0\]

FCsg\_error **sg\_unlock\_mutex**F\[0\]  FC(char const \**mutex\_name*);F\[0\]

## DESCRIPTION

## RETURN VALUES

Both functions return a statgrab error code.

**error code**: SG\_ERROR\_NONE\
 **description**: No error

**error code**: SG\_ERROR\_INVALID\_ARGUMENT\
 **description**: Unknown name for mutex

**error code**: SG\_ERROR\_MUTEX\_LOCK\
 **description**: thread library error, error code is set with the delivered value

**error code**: SG\_ERROR\_MUTEX\_UNLOCK\
 **description**: thread library error, error code is set with the delivered value

## SEE ALSO

[**statgrab**(3)](/statgrab/3.md)

## WEBSITE

⟨https://libstatgrab.org/⟩
