Home |
RTTarget-32 Programming Manual Function RTSetFlsSlots Function RTSetDLLNameTranslation System Management BIOS (SMBIOS) Advanced Programmable Interrupt Controller (APIC) |
Function RTSetFlsSlotsFunction RTSetFlsSlots changes the number of available FLS slots: DWORD RTSetFlsSlots(DWORD Slots, LPVOID * MainTlsArray, LPVOID * CBArray, DWORD * IDXArray); ParametersSlotsNew number of available FLS slots. This value must be in the range 16 .. 256. MainTlsArrayTLS data array to use for the main thread of the application. This array must have at least Slots entries. It is used to call function RTSetTlsSlots. CBArrayData array to store Callbacks registered through function FlsAlloc. This array must have at least Slots entries. IDXArrayData array to store TLS indexes Callbacks reguested through function FlsAlloc. This array must have at least Slots entries. return valueNumber of allocated FLS slots after the call. This function must be called before any threads have been created. The default number of available FLS slots is 16. This function also increases the number of TLS slots by calling function RTSetTlsSlots(Slots, MainTlsArray). This function cannot be used to decrease the number of FLS slots. If Slots specifies a value less than the current limit, the function has no effect and the old limit is returned. Example:#include <windows.h> #include <rttarget.h> #define NEEDED_FLS_SLOTS 32 LPVOID MainTlsArray[NEEDED_FLS_SLOTS]; LPVOID CBArray[NEEDED_FLS_SLOTS]; DWORD IDXArray[NEEDED_FLS_SLOTS]; int main(void) { if (RTSetFlsSlots(NEEDED_FLS_SLOTS, MainTlsArray, CBAerray, IDXArray) < NEEDED_FLS_SLOTS) printf("failed to increase FLS slots!\n"); ... }
|