mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-23 20:45:05 +08:00
✨ feat: delete thread ref (#8456)
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user