AkTls.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*******************************************************************************
  2. The content of this file includes portions of the AUDIOKINETIC Wwise Technology
  3. released in source code form as part of the SDK installer package.
  4. Commercial License Usage
  5. Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology
  6. may use this file in accordance with the end user license agreement provided
  7. with the software or, alternatively, in accordance with the terms contained in a
  8. written agreement between you and Audiokinetic Inc.
  9. Apache License Usage
  10. Alternatively, this file may be used under the Apache License, Version 2.0 (the
  11. "Apache License"); you may not use this file except in compliance with the
  12. Apache License. You may obtain a copy of the Apache License at
  13. http://www.apache.org/licenses/LICENSE-2.0.
  14. Unless required by applicable law or agreed to in writing, software distributed
  15. under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
  16. OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for
  17. the specific language governing permissions and limitations under the License.
  18. Copyright (c) 2023 Audiokinetic Inc.
  19. *******************************************************************************/
  20. // AkTls.h -- thread-local storage abstraction
  21. #pragma once
  22. #include <AK/AkPlatforms.h>
  23. #include <AK/SoundEngine/Common/AkSoundEngineExport.h>
  24. typedef AkInt32 AkTlsSlot;
  25. #define AKTLS_NULL (0)
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif
  29. AK_EXTERNAPIFUNC( int, AkTlsAllocateSlot )(
  30. AkTlsSlot * out_pSlot
  31. );
  32. AK_EXTERNAPIFUNC( void, AkTlsFreeSlot )(
  33. AkTlsSlot in_slot
  34. );
  35. AK_EXTERNAPIFUNC(AkUIntPtr, AkTlsGetValue )(
  36. AkTlsSlot in_slot
  37. );
  38. AK_EXTERNAPIFUNC( void, AkTlsSetValue )(
  39. AkTlsSlot in_slot,
  40. AkUIntPtr in_value
  41. );
  42. #ifdef __cplusplus
  43. }
  44. #endif