Asterisk - The Open Source Telephony Project  18.5.0
Data Fields
ast_threadstorage Struct Reference

data for a thread locally stored variable More...

#include <threadstorage.h>

Data Fields

int(* custom_init )(void *)
 
pthread_key_t key
 
void(* key_init )(void)
 
pthread_once_t once
 

Detailed Description

data for a thread locally stored variable

Examples:
/usr/src/asterisk-18.5.0/include/asterisk/strings.h.

Definition at line 56 of file threadstorage.h.

Field Documentation

◆ custom_init

int(* custom_init) (void *)

Custom initialization function specific to the object

Definition at line 60 of file threadstorage.h.

Referenced by ast_threadstorage_get().

◆ key

pthread_key_t key

The key used to retrieve this thread's data

Definition at line 58 of file threadstorage.h.

Referenced by ast_threadstorage_get(), and ast_threadstorage_get_ptr().

◆ key_init

void(* key_init) (void)

The function that initializes the key

Definition at line 59 of file threadstorage.h.

Referenced by ast_threadstorage_get(), and ast_threadstorage_get_ptr().

◆ once

pthread_once_t once

Ensure that the key is only initialized by one thread

Definition at line 57 of file threadstorage.h.

Referenced by ast_threadstorage_get(), and ast_threadstorage_get_ptr().


The documentation for this struct was generated from the following file: