embedded.h 699 B

12345678910111213141516171819202122232425262728
  1. #ifndef EMBEDDED_H
  2. #define EMBEDDED_H
  3. #include <inttypes.h>
  4. #define HAS_MUTEX_CREATE_P 0
  5. #define HAS_PTHREAD_SETNAME_NP 1
  6. #ifndef PTHREAD_STACK_MIN
  7. #define PTHREAD_STACK_MIN 256
  8. #endif
  9. #define STREAM_THREAD_STACK_SIZE 8 * 1024
  10. #define DECODE_THREAD_STACK_SIZE 20 * 1024
  11. #define OUTPUT_THREAD_STACK_SIZE 8 * 1024
  12. #define IR_THREAD_STACK_SIZE 8 * 1024
  13. typedef int16_t s16_t;
  14. typedef int32_t s32_t;
  15. typedef int64_t s64_t;
  16. typedef unsigned long long u64_t;
  17. // all exit() calls are made from main thread (or a function called in main thread)
  18. #define exit(code) { int ret = code; pthread_exit(&ret); }
  19. int pthread_setname_np(pthread_t thread, const char *name);
  20. #endif // EMBEDDED_H