[rt-smart] 弱化 RT_USING_LWP,使用 RT_USING_SMART 作为宏配置 (#6740)

* [dfs] sync cromfs

* [rt-smart]Weaken RT_USING_LWP, use RT_USING_SMART as macro configuration

* [format] fix some format issue.
This commit is contained in:
guo
2022-12-16 18:38:28 +08:00
committed by GitHub
parent 3ea5166376
commit 68ca9f07a6
95 changed files with 322 additions and 336 deletions
+16 -16
View File
@@ -420,9 +420,9 @@ struct rt_object
void *module_id; /**< id of application module */
#endif /* RT_USING_MODULE */
#ifdef RT_USING_LWP
#ifdef RT_USING_SMART
int lwp_ref_count; /**< ref count for lwp */
#endif /* RT_USING_LWP */
#endif /* RT_USING_SMART */
rt_list_t list; /**< list node of kernel object */
};
@@ -573,7 +573,7 @@ typedef void (*rt_sighandler_t)(int signo);
#else
#ifdef RT_USING_LWP
#ifdef RT_USING_SMART
#include <sys/signal.h>
#endif
@@ -676,7 +676,7 @@ struct rt_cpu
struct rt_thread;
#ifdef RT_USING_LWP
#ifdef RT_USING_SMART
typedef rt_err_t (*rt_wakeup_func_t)(void *object, struct rt_thread *thread);
struct rt_wakeup
@@ -733,9 +733,9 @@ struct rt_thread
void *module_id; /**< id of application module */
#endif /* RT_USING_MODULE */
#ifdef RT_USING_LWP
#ifdef RT_USING_SMART
int lwp_ref_count; /**< ref count for lwp */
#endif /* RT_USING_LWP */
#endif /* RT_USING_SMART */
rt_list_t list; /**< the object list */
rt_list_t tlist; /**< the thread list */
@@ -793,7 +793,7 @@ struct rt_thread
void *si_list; /**< the signal infor list */
#endif /* RT_USING_SIGNALS */
#if defined(RT_USING_LWP)
#ifdef RT_USING_SMART
void *msg_ret; /**< the return msg */
#endif
@@ -813,7 +813,7 @@ struct rt_thread
void (*cleanup)(struct rt_thread *tid); /**< cleanup function when thread exit */
/* light weight process if present */
#ifdef RT_USING_LWP
#ifdef RT_USING_SMART
void *lwp;
/* for user create */
void *user_entry;
@@ -833,7 +833,7 @@ struct rt_thread
struct rt_wakeup wakeup; /**< wakeup data */
int exit_request;
#ifdef RT_USING_USERSPACE
#if defined(ARCH_MM_MMU)
int step_exec;
int debug_attach_req;
int debug_ret_user;
@@ -1226,10 +1226,10 @@ typedef struct rt_wqueue rt_wqueue_t;
struct rt_device
{
struct rt_object parent; /**< inherit from rt_object */
#ifdef RT_USING_DM
#ifdef RT_USING_DM
struct rt_driver *drv;
void *dtb_node;
#endif
void *dtb_node;
#endif
enum rt_device_class_type type; /**< device type */
rt_uint16_t flag; /**< device flag */
rt_uint16_t open_flag; /**< device open flag */
@@ -1262,7 +1262,7 @@ struct rt_device
};
#define RT_DRIVER_MATCH_DTS (1<<0)
struct rt_device_id
struct rt_device_id
{
const char *compatible;
void *data;
@@ -1270,7 +1270,7 @@ struct rt_device_id
struct rt_driver
{
#ifdef RT_USING_DEVICE_OPS
#ifdef RT_USING_DEVICE_OPS
const struct rt_device_ops *dev_ops;
#else
/* common device interface */
@@ -1279,7 +1279,7 @@ struct rt_driver
rt_err_t (*close) (rt_device_t dev);
rt_size_t (*read) (rt_device_t dev, rt_off_t pos, void *buffer, rt_size_t size);
rt_size_t (*write) (rt_device_t dev, rt_off_t pos, const void *buffer, rt_size_t size);
rt_err_t (*control)(rt_device_t dev, int cmd, void *args);
rt_err_t (*control)(rt_device_t dev, int cmd, void *args);
#endif
const struct filesystem_ops *fops;
const char *name;
@@ -1304,7 +1304,7 @@ struct rt_device_notify
struct rt_device *dev;
};
#ifdef RT_USING_LWP
#ifdef RT_USING_SMART
struct rt_channel
{
struct rt_ipc_object parent; /**< inherit from object */
+1 -1
View File
@@ -166,7 +166,7 @@ rt_err_t rt_thread_control(rt_thread_t thread, int cmd, void *arg);
rt_err_t rt_thread_suspend(rt_thread_t thread);
rt_err_t rt_thread_suspend_with_flag(rt_thread_t thread, int suspend_flag);
rt_err_t rt_thread_resume(rt_thread_t thread);
#ifdef RT_USING_LWP
#ifdef RT_USING_SMART
rt_err_t rt_thread_wakeup(rt_thread_t thread);
void rt_thread_wakeup_set(struct rt_thread *thread, rt_wakeup_func_t func, void* user_data);
#endif