---
name: "iv_init"
section: "3"
platform: "linux"
package: "libivykis-dev"
version: "0.43.2-1+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/iv_init"
---

# iv\_init(3)

initialise and deinitialise ivykis

## NAME

iv\_init, iv\_deinit, iv\_inited - initialise and deinitialise ivykis

## SYNOPSIS

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

**void iv\_init(void);**\
 **void iv\_deinit(void);**\
 **int iv\_inited(void);**\

## DESCRIPTION

**iv\_init** initialises the current thread's ivykis event loop.

Each thread that wants to use ivykis must call **iv\_init** before any other ivykis functions are called.

The very first call to **iv\_init** in a process must run to completion before other threads are allowed to call **iv\_init,** but subsequent calls to **iv\_init** can be done concurrently.

**iv\_deinit** frees all resources allocated by ivykis in this thread, and should be called before this thread exits.

**iv\_inited** returns true if **iv\_init** has been called in this thread.  After **iv\_deinit** is called, it will return false.

## SEE ALSO

[**ivykis**(3)](/ivykis/3.md), [**iv\_examples**(3)](/iv_examples/3.md)
