lwp_pid.h 739 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright (c) 2006-2020, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2020-02-23 Jesven first version.
  9. */
  10. #ifndef LWP_PID_H__
  11. #define LWP_PID_H__
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. struct rt_lwp;
  16. struct rt_lwp* lwp_new(void);
  17. void lwp_free(struct rt_lwp* lwp);
  18. void lwp_ref_inc(struct rt_lwp *lwp);
  19. void lwp_ref_dec(struct rt_lwp *lwp);
  20. struct rt_lwp* lwp_from_pid(pid_t pid);
  21. pid_t lwp_to_pid(struct rt_lwp* lwp);
  22. int32_t lwp_name2pid(const char* name);
  23. char* lwp_pid2name(int32_t pid);
  24. int lwp_getpid(void);
  25. pid_t waitpid(pid_t pid, int *status, int options);
  26. long list_process(void);
  27. #ifdef __cplusplus
  28. }
  29. #endif
  30. #endif