selectThreadImpl.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // Filename: selectThreadImpl.h
  2. // Created by: drose (09Aug02)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved
  8. //
  9. // All use of this software is subject to the terms of the Panda 3d
  10. // Software license. You should have received a copy of this license
  11. // along with this source code; you will also find a current copy of
  12. // the license at http://www.panda3d.org/license.txt .
  13. //
  14. // To contact the maintainers of this program write to
  15. // [email protected] .
  16. //
  17. ////////////////////////////////////////////////////////////////////
  18. #ifndef SELECTTHREADIMPL_H
  19. #define SELECTTHREADIMPL_H
  20. #include "pandabase.h"
  21. ////////////////////////////////////////////////////////////////////
  22. // This file decides which of the core implementations of the various
  23. // threading and locking implementations we should use, based on
  24. // platform and/or available libraries.
  25. ////////////////////////////////////////////////////////////////////
  26. #if !defined(HAVE_THREADS)
  27. // With threading disabled, use the do-nothing implementation.
  28. #define THREAD_DUMMY_IMPL 1
  29. #elif defined(HAVE_NSPR)
  30. // If NSPR is available, use that.
  31. #define THREAD_NSPR_IMPL 1
  32. #else
  33. // This is a configuration error. For some reason, HAVE_THREADS is
  34. // defined but we don't have any way to implement it.
  35. #error No thread implementation defined for platform.
  36. #endif
  37. #endif