Home |
RTKernel-32 Programming Manual Function RTKAllocUserData |
Function RTKAllocUserDataRTKernel-32 reserves up to 16 user data entries for each task. Each entry is a void pointer and can be used by the application for arbitrary purposes. To reserve an entry for each task, the following function call can be used: int RTKAllocUserData(void); The function result is a valid index for every task, even those created at a later time. It can be used as a parameter for RTKGetUserData and RTKSetUserData. If all 16 user data entries are already occupied, the program is aborted by RTKAllocUserdata with an error message. RTKernel-32's user data corresponds to Win32's TLS data. However, unlike Win32, RTKernel-32 also allows access to the TLS of tasks other than the current task. Task user data indexes and TLS indexes should not be mixed (e.g., do not call TlsGetValue with a task user data index).
|