dspbios-osal.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*
  2. * dspbios-osal.h
  3. *
  4. * Description:
  5. *
  6. * --------------------------------------------------------------------------
  7. *
  8. * Pthreads-embedded (PTE) - POSIX Threads Library for embedded systems
  9. * Copyright(C) 2008 Jason Schmidlapp
  10. *
  11. * Contact Email: [email protected]
  12. *
  13. * This library is free software; you can redistribute it and/or
  14. * modify it under the terms of the GNU Lesser General Public
  15. * License as published by the Free Software Foundation; either
  16. * version 2 of the License, or (at your option) any later version.
  17. *
  18. * This library is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  21. * Lesser General Public License for more details.
  22. *
  23. * You should have received a copy of the GNU Lesser General Public
  24. * License along with this library in the file COPYING.LIB;
  25. * if not, write to the Free Software Foundation, Inc.,
  26. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  27. */
  28. #include <std.h>
  29. #include <tsk.h>
  30. #include <sem.h>
  31. #include <lck.h>
  32. #include <errno.h>
  33. typedef TSK_Handle pte_osThreadHandle;
  34. typedef SEM_Handle pte_osSemaphoreHandle;
  35. typedef LCK_Handle pte_osMutexHandle;
  36. #define OS_DEFAULT_PRIO 11
  37. #define OS_MAX_SIMUL_THREADS 10
  38. #ifndef EPERM
  39. #define EPERM 1
  40. #endif // EPERM
  41. #ifndef ESRCH
  42. #define ESRCH 3
  43. #endif // ESRCH
  44. #ifndef EINTR
  45. #define EINTR 4
  46. #endif // EINTR
  47. #ifndef EIO
  48. #define EIO 5
  49. #endif // EIO
  50. #ifndef EAGAIN
  51. #define EAGAIN 11
  52. #endif // EAGAIN
  53. #ifndef ENOMEM
  54. #define ENOMEM 12
  55. #endif // ENOMEM
  56. #ifndef EBUSY
  57. #define EBUSY 16
  58. #endif // EBUSY
  59. #ifndef EINVAL
  60. #define EINVAL 22
  61. #endif // EINVAL
  62. #ifndef ENOSPC
  63. #define ENOSPC 28
  64. #endif // ENOSPC
  65. #ifndef EDEADLK
  66. #define EDEADLK 35
  67. #endif /* EDEADLK */
  68. #ifndef ENOSYS
  69. #define ENOSYS 38
  70. #endif /* ENOSYS */
  71. #ifndef ENOTSUP
  72. #define ENOTSUP 95
  73. #endif /* ENOTSUP */
  74. #ifndef ETIMEDOUT
  75. #define ETIMEDOUT 116
  76. #endif // ETIMEDOUT