sf_thread.h 631 B

12345678910111213141516171819202122232425262728
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (C) 2022 StarFive Technology Co., Ltd.
  4. */
  5. #ifndef SF_THREAD_H
  6. #define SF_THREAD_H
  7. #include <stdint.h>
  8. #include <errno.h>
  9. #include <stdlib.h>
  10. #include <time.h>
  11. #include <pthread.h>
  12. #include "OMX_Types.h"
  13. #include "OMX_Core.h"
  14. typedef struct _THREAD_HANDLE_TYPE
  15. {
  16. pthread_t pthread;
  17. pthread_attr_t attr;
  18. struct sched_param schedparam;
  19. int stack_size;
  20. } THREAD_HANDLE_TYPE;
  21. OMX_ERRORTYPE CreateThread(THREAD_HANDLE_TYPE **threadHandle, OMX_PTR function_name, OMX_PTR argument);
  22. void ThreadExit(void *value_ptr);
  23. #endif //SF_THREAD_H