embedded.h 615 B

123456789101112131415161718192021222324252627
  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. #define exit(code) { int ret = code; pthread_exit(&ret); }
  18. int pthread_setname_np(pthread_t thread, const char *name);
  19. #endif // EMBEDDED_H