---
name: "LOCK_FUNCTION"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/LOCK_FUNCTION"
---

# LOCK\_FUNCTION(3alleg)

Locks the memory of a function used by a timer. Allegro game programming library.

## NAME

LOCK\_FUNCTION - Locks the memory of a function used by a timer. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**Macro LOCK\_FUNCTION(function\_name);**

## DESCRIPTION

Due to interrupts, you are required to lock all the memory used by your timer routines. See the description of install\_int\_ex() for a more detailed explanation and usage example.

## SEE ALSO

[**install\_int**(3alleg)](/install_int/3alleg.md), [**install\_int\_ex**(3alleg)](/install_int_ex/3alleg.md), [**exkeys**(3alleg)](/exkeys/3alleg.md), [**exscn3d**(3alleg)](/exscn3d/3alleg.md), [**exsprite**(3alleg)](/exsprite/3alleg.md), [**exswitch**(3alleg)](/exswitch/3alleg.md), [**extimer**(3alleg)](/extimer/3alleg.md), [**exupdate**(3alleg)](/exupdate/3alleg.md), [**exzbuf**(3alleg)](/exzbuf/3alleg.md)
