--- version: tip layout: manpage title: nng_mtx_unlock(3supp) ---
{% if page.version and page.version != site.latest %} {% if page.version == "tip" %} {% include tip_version.html %} {% else %} {% include old_version.html %} {% endif %} {% endif %}

SYNOPSIS

#include <nng/nng.h>
#include <nng/supplemental/util/platform.h>

void nng_mtx_unlock(nng_mtx *mtx);

DESCRIPTION

The nng_mtx_unlock() relinquishes ownership of the mutex mtx that was previously acquired via nng_mtx_lock().

A mutex can only be unlocked by the thread that locked it. Attempting to unlock a mutex that is not owned by the caller will result in undefined behavior.

RETURN VALUES

None.

ERRORS

None.