platform_mutex.h 653 B

1234567891011121314151617181920212223
  1. /*
  2. * @Author: jiejie
  3. * @Github: https://github.com/jiejieTop
  4. * @Date: 2019-12-15 18:31:33
  5. * @LastEditTime : 2020-01-16 00:19:10
  6. * @Description: the code belongs to jiejie, please keep the author information and source code according to the license.
  7. */
  8. #ifndef _PLATFORM_MUTEX_H_
  9. #define _PLATFORM_MUTEX_H_
  10. #include "tos_k.h"
  11. typedef struct platform_mutex {
  12. k_mutex_t mutex;
  13. } platform_mutex_t;
  14. int platform_mutex_init(platform_mutex_t* m);
  15. int platform_mutex_lock(platform_mutex_t* m);
  16. int platform_mutex_trylock(platform_mutex_t* m);
  17. int platform_mutex_unlock(platform_mutex_t* m);
  18. int platform_mutex_destroy(platform_mutex_t* m);
  19. #endif