### Function Macro

# GLib AUTO_LOCK

since: 2.80

#### Declaration [src]

    #define G_AUTO_LOCK (
      name
    )

#### Description [src]

Works like `G_MUTEX_AUTO_LOCK()`, but for a lock defined with `G_LOCK_DEFINE()`.

This feature is only supported on GCC and clang. This macro is not defined on other compilers and should not be used in programs that are intended to be portable to those compilers.

Available since: 2.80

This function is not directly available to language bindings.

#### Parameters

`name`

  Type: `-`

  The name of the lock.