Thread.h 1012 B

1234567891011121314151617181920212223242526272829
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. #pragma once
  6. namespace PlatformAgnostic
  7. {
  8. class Thread
  9. {
  10. public:
  11. enum ThreadInitFlag {
  12. ThreadInitRunImmediately,
  13. ThreadInitCreateSuspended,
  14. ThreadInitStackSizeParamIsAReservation
  15. };
  16. typedef uintptr_t ThreadHandle;
  17. static const uintptr_t InvalidHandle = (uintptr_t)-1;
  18. static ThreadHandle Create(unsigned int stack_size,
  19. unsigned int ( *start_address )( void * ),
  20. void* arg_list,
  21. ThreadInitFlag init_flag,
  22. const char16* description);
  23. };
  24. } // namespace PlatformAgnostic