feat: delete thread ref (#8456)

This commit is contained in:
xqyjlj
2024-01-05 17:03:55 +08:00
committed by GitHub
parent db2cfd335f
commit 6b6d39d716
5 changed files with 1 additions and 17 deletions
-6
View File
@@ -1127,7 +1127,6 @@ struct rt_thread
#endif
#endif
rt_atomic_t ref_count;
struct rt_spinlock spinlock;
rt_ubase_t user_data; /**< private user data beyond this thread */
};
@@ -1139,11 +1138,6 @@ typedef struct rt_thread *rt_thread_t;
/**@}*/
#define rt_atomic_inc(v) rt_atomic_add((v), 1)
#define rt_atomic_dec(v) rt_atomic_sub((v), 1)
#define rt_get_thread_struct(object) do { rt_atomic_inc(&(object)->ref_count); } while(0)
#define rt_put_thread_struct(object) do { rt_atomic_dec(&(object)->ref_count); } while(0)
/**
* @addtogroup IPC
*/