sync smart & dfs (#8672)

Signed-off-by: xqyjlj <xqyjlj@126.com>
Signed-off-by: Shell <smokewood@qq.com>
Co-authored-by: xqyjlj <xqyjlj@126.com>
This commit is contained in:
Shellandxqyjlj authored and GitHub committed 2024-03-28 23:42:56 +08:00
1 parent 40e26f4909
commit 83e95bdff4
131 files changed
+14954 -6478

No files matched your search

-1
View File
@@ -25,7 +25,6 @@ config RT_USING_SMART
select RT_USING_DFS
select RT_USING_POSIX_CLOCKTIME
select RT_USING_DEVICE
select RT_USING_TTY
select RT_USING_NULL
select RT_USING_ZERO
select RT_USING_RANDOM
+1 -1
View File
@@ -598,7 +598,7 @@ static rt_err_t _rt_sem_take(rt_sem_t sem, rt_int32_t timeout, int suspend_flag)
thread = rt_thread_self();
/* reset thread error number */
thread->error = -RT_EINTR;
thread->error = RT_EINTR;
LOG_D("sem take: suspend thread - %s", thread->parent.name);
-23
View File
@@ -47,7 +47,6 @@
#ifdef RT_USING_SMART
#include <lwp.h>
#include <lwp_user_mm.h>
#include <console.h>
#endif
/**
@@ -283,27 +282,6 @@ RTM_EXPORT(rt_console_get_device);
*/
rt_device_t rt_console_set_device(const char *name)
{
#ifdef RT_USING_SMART
rt_device_t new_iodev = RT_NULL, old_iodev = RT_NULL;
/* find new console device */
new_iodev = rt_device_find(name);
if (new_iodev != RT_NULL)
{
if (_console_device != RT_NULL)
{
old_iodev = console_set_iodev(new_iodev);
}
else
{
console_register("console", new_iodev);
_console_device = rt_device_find("console");
rt_device_open(_console_device, RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_STREAM);
}
}
return old_iodev;
#else
rt_device_t new_device, old_device;
/* save old device */
@@ -329,7 +307,6 @@ rt_device_t rt_console_set_device(const char *name)
}
return old_device;
#endif
}
RTM_EXPORT(rt_console_set_device);
#endif /* RT_USING_DEVICE */
+8 -1
View File
@@ -15,6 +15,7 @@
* 2018-01-25 Bernard Fix the object find issue when enable MODULE.
* 2022-01-07 Gabriel Moving __on_rt_xxxxx_hook to object.c
* 2023-09-15 xqyjlj perf rt_hw_interrupt_disable/enable
* 2023-11-17 xqyjlj add process group and session support
*/
#include <rtthread.h>
@@ -74,6 +75,8 @@ enum rt_object_info_type
#endif
#ifdef RT_USING_SMART
RT_Object_Info_Channel, /**< The object is a IPC channel */
RT_Object_Info_ProcessGroup, /**< The object is a process group */
RT_Object_Info_Session, /**< The object is a session */
#endif
#ifdef RT_USING_HEAP
RT_Object_Info_Custom, /**< The object is a custom object */
@@ -133,6 +136,10 @@ static struct rt_object_information _object_container[RT_Object_Info_Unknown] =
#ifdef RT_USING_SMART
/* initialize object container - module */
{RT_Object_Class_Channel, _OBJ_CONTAINER_LIST_INIT(RT_Object_Info_Channel), sizeof(struct rt_channel), RT_SPINLOCK_INIT},
{RT_Object_Class_ProcessGroup, _OBJ_CONTAINER_LIST_INIT(RT_Object_Info_ProcessGroup), sizeof(struct rt_processgroup), RT_SPINLOCK_INIT},
{RT_Object_Class_Session, _OBJ_CONTAINER_LIST_INIT(RT_Object_Info_Session), sizeof(struct rt_session), RT_SPINLOCK_INIT},
#endif
#ifdef RT_USING_HEAP
{RT_Object_Class_Custom, _OBJ_CONTAINER_LIST_INIT(RT_Object_Info_Custom), sizeof(struct rt_custom_object), RT_SPINLOCK_INIT},
#endif
};
@@ -469,7 +476,7 @@ rt_object_t rt_object_allocate(enum rt_object_class_type type, const char *name)
object->flag = 0;
#if RT_NAME_MAX > 0
rt_strncpy(object->name, name, RT_NAME_MAX); /* copy name */
rt_strncpy(object->name, name, RT_NAME_MAX - 1); /* copy name */
#else
object->name = name;
#endif /* RT_NAME_MAX > 0 */
+5 -1
View File
@@ -19,7 +19,11 @@
#ifdef RT_USING_SIGNALS
#ifndef RT_SIG_INFO_MAX
#define RT_SIG_INFO_MAX 32
#ifdef ARCH_CPU_64BIT
#define RT_SIG_INFO_MAX 64
#else
#define RT_SIG_INFO_MAX 32
#endif /* ARCH_CPU_64BIT */
#endif /* RT_SIG_INFO_MAX */
#define DBG_TAG "SIGN"