Intel® oneAPI Math Kernel Library Developer Reference - C

MKLFreeTls

Frees allocated VM/VS thread local storage memory from within DllMain routine. Use on Windows* OS only.

Syntax

void MKLFreeTls( const MKL_UINT fdwReason );

Include Files

Description

The MKLFreeTls routine frees thread local storage (TLS) memory which has been allocated when using MKL static libraries to link into a DLL on the Windows* OS. The routine should only be used within DllMain.

Note

It is only necessary to use MKLFreeTls for TLS data in the VM and VS domains.

Input Parameters

Name

Type

Description

fdwReason

const MKL_UINT

Reason code from the DllMain call.

Example

BOOL WINAPI DllMain(HINSTANCE hInst, DWORD fdwReason, LPVOID lpvReserved)
{
    /*customer code*/
    MKLFreeTls(fdwReason);
    /*customer code*/
}