diff options
| author | Shell <[email protected]> | 2024-03-28 23:42:56 +0800 |
|---|---|---|
| committer | Rbb666 <[email protected]> | 2024-04-19 15:09:47 +0800 |
| commit | 17d22ad408c5c5bbabd9e895500f7a5835f1a44b (patch) | |
| tree | 147740020bd1c8ab3188a84773a314b6ccd325d6 /include | |
| parent | da37ea86c8337e9099d61abf0c4bf87e3b192b1b (diff) | |
sync smart & dfs (#8672)
Signed-off-by: xqyjlj <[email protected]>
Signed-off-by: Shell <[email protected]>
Co-authored-by: xqyjlj <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/rtdef.h | 27 | ||||
| -rw-r--r-- | include/rttypes.h | 9 |
2 files changed, 30 insertions, 6 deletions
diff --git a/include/rtdef.h b/include/rtdef.h index 1ba99dcb4d..abd4a95639 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -53,6 +53,8 @@ * 2023-10-10 Chushicheng change version number to v5.1.0 * 2023-10-11 zmshahaha move specific devices related and driver to components/drivers * 2023-11-21 Meco Man add RT_USING_NANO macro + * 2023-11-17 xqyjlj add process group and session support + * 2023-12-01 Shell Support of dynamic device * 2023-12-18 xqyjlj add rt_always_inline * 2023-12-22 Shell Support hook list * 2024-01-18 Shell Seperate basical types to a rttypes.h @@ -385,8 +387,10 @@ enum rt_object_class_type RT_Object_Class_Module = 0x0b, /**< The object is a module. */ RT_Object_Class_Memory = 0x0c, /**< The object is a memory. */ RT_Object_Class_Channel = 0x0d, /**< The object is a channel */ - RT_Object_Class_Custom = 0x0e, /**< The object is a custom object */ - RT_Object_Class_Unknown = 0x0f, /**< The object is unknown. */ + RT_Object_Class_ProcessGroup = 0x0e, /**< The object is a process group */ + RT_Object_Class_Session = 0x0f, /**< The object is a session */ + RT_Object_Class_Custom = 0x10, /**< The object is a custom object */ + RT_Object_Class_Unknown = 0x11, /**< The object is unknown. */ RT_Object_Class_Static = 0x80 /**< The object is a static object. */ }; @@ -796,17 +800,30 @@ struct lwp_sigaction { void (*sa_restorer)(void); }; +typedef struct lwp_siginfo_ext { + union { + /* for SIGCHLD */ + struct { + int status; + clock_t utime; + clock_t stime; + } sigchld; + }; +} *lwp_siginfo_ext_t; + typedef struct lwp_siginfo { rt_list_t node; struct { int signo; int code; - long value; int from_tid; pid_t from_pid; } ksiginfo; + + /* the signal specified extension field */ + struct lwp_siginfo_ext *ext; } *lwp_siginfo_t; typedef struct lwp_sigqueue { @@ -1240,6 +1257,7 @@ enum rt_device_class_type #define RT_DEVICE_FLAG_ACTIVATED 0x010 /**< device is activated */ #define RT_DEVICE_FLAG_SUSPENDED 0x020 /**< device is suspended */ #define RT_DEVICE_FLAG_STREAM 0x040 /**< stream mode */ +#define RT_DEVICE_FLAG_DYNAMIC 0x080 /**< device is determined when open() */ #define RT_DEVICE_FLAG_INT_RX 0x100 /**< INT mode on Rx */ #define RT_DEVICE_FLAG_DMA_RX 0x200 /**< DMA mode on Rx */ @@ -1354,6 +1372,9 @@ struct rt_device struct rt_wqueue wait_queue; #endif /* RT_USING_POSIX_DEVIO */ + rt_err_t (*readlink) + (rt_device_t dev, char *buf, int len); /**< for dynamic device */ + void *user_data; /**< device private data */ }; diff --git a/include/rttypes.h b/include/rttypes.h index 55371b271d..bce316e397 100644 --- a/include/rttypes.h +++ b/include/rttypes.h @@ -79,15 +79,15 @@ typedef rt_ubase_t rt_dev_t; /**< Type for device */ typedef rt_base_t rt_off_t; /**< Type for offset */ #ifdef __cplusplus -typedef rt_base_t rt_atomic_t; +typedef rt_ubase_t rt_atomic_t; #else #if defined(RT_USING_HW_ATOMIC) -typedef rt_base_t rt_atomic_t; +typedef rt_ubase_t rt_atomic_t; #elif defined(RT_USING_STDC_ATOMIC) #include <stdatomic.h> typedef atomic_intptr_t rt_atomic_t; #else -typedef rt_base_t rt_atomic_t; +typedef rt_ubase_t rt_atomic_t; #endif /* RT_USING_STDC_ATOMIC */ #endif /* __cplusplus */ @@ -215,6 +215,9 @@ struct rt_spinlock struct rt_spinlock { +#ifdef RT_USING_DEBUG + rt_uint32_t critical_level; +#endif /* RT_USING_DEBUG */ rt_ubase_t lock; }; #define RT_SPINLOCK_INIT {0} |
