Skip to content

Commit 19c0ceb

Browse files
committed
fix structure comments according to doxygen spec.
1 parent 9ebabdd commit 19c0ceb

File tree

1 file changed

+104
-96
lines changed

1 file changed

+104
-96
lines changed

components/lwp/lwp.h

Lines changed: 104 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -64,22 +64,27 @@ extern "C" {
6464
#define LWP_ARG_MAX 8
6565

6666
/**
67-
* Light-weight process memory objects structure
67+
* @brief Light-weight process memory objects structure
6868
*/
6969
struct rt_lwp_objs
7070
{
71-
rt_aspace_t source; /* The address space associated with this LWP */
72-
struct rt_mem_obj mem_obj; /* The memory object containing memory management information */
71+
rt_aspace_t source; /**< The address space associated with this LWP */
72+
struct rt_mem_obj mem_obj; /**< The memory object containing memory management information */
7373
};
7474

7575
/**
76-
* Light-weight process notification structure
76+
* @brief Light-weight process notification structure
7777
*/
7878
struct rt_lwp_notify
7979
{
80-
void (*notify)(rt_wqueue_t *signalfd_queue, int signo); /* Callback function pointer for signal notification */
81-
rt_wqueue_t *signalfd_queue; /* Wait queue for signal file descriptors */
82-
rt_slist_t list_node; /* List node for notification */
80+
/**
81+
* @brief Callback function pointer for signal notification
82+
* @param signalfd_queue Wait queue for signal file descriptors
83+
* @param signo Signal number
84+
*/
85+
void (*notify)(rt_wqueue_t *signalfd_queue, int signo);
86+
rt_wqueue_t *signalfd_queue; /**< Wait queue for signal file descriptors */
87+
rt_slist_t list_node; /**< List node for notification */
8388
};
8489

8590
struct lwp_tty;
@@ -99,122 +104,122 @@ typedef struct rt_session *rt_session_t;
99104
typedef struct rt_processgroup *rt_processgroup_t;
100105

101106
/**
102-
* Session control structure for process groups
107+
* @brief Session control structure for process groups
103108
*/
104109
struct rt_session {
105110
struct rt_object object;
106-
rt_lwp_t leader; /* Session leader process */
107-
rt_list_t processgroup; /* List head of process groups in this session */
108-
pid_t sid; /* Session ID */
109-
pid_t foreground_pgid; /* Foreground process group ID */
110-
struct rt_mutex mutex; /* Mutex for session operations synchronization */
111-
struct lwp_tty *ctty; /* Control terminal */
111+
rt_lwp_t leader; /**< Session leader process */
112+
rt_list_t processgroup; /**< List head of process groups in this session */
113+
pid_t sid; /**< Session ID */
114+
pid_t foreground_pgid; /**< Foreground process group ID */
115+
struct rt_mutex mutex; /**< Mutex for session operations synchronization */
116+
struct lwp_tty *ctty; /**< Control terminal */
112117
};
113118

114119
/**
115-
* Process group control structure
120+
* @brief Process group control structure
116121
*/
117122
struct rt_processgroup {
118123
struct rt_object object;
119-
rt_lwp_t leader; /* Process group leader process */
120-
rt_list_t process; /* List head of processes in this process group */
121-
rt_list_t pgrp_list_node; /* List node for process group */
122-
pid_t pgid; /* Process group ID */
123-
pid_t sid; /* Session ID */
124-
struct rt_session *session; /* Session pointer */
125-
struct rt_mutex mutex; /* Mutex for process group operations synchronization */
124+
rt_lwp_t leader; /**< Process group leader process */
125+
rt_list_t process; /**< List head of processes in this process group */
126+
rt_list_t pgrp_list_node; /**< List node for process group */
127+
pid_t pgid; /**< Process group ID */
128+
pid_t sid; /**< Session ID */
129+
struct rt_session *session; /**< Session pointer */
130+
struct rt_mutex mutex; /**< Mutex for process group operations synchronization */
126131

127-
rt_atomic_t ref; /* Reference count for process group */
132+
rt_atomic_t ref; /**< Reference count for process group */
128133

129134
/* flags on process group */
130-
unsigned int is_orphaned:1; /* Whether the process group is orphaned */
135+
unsigned int is_orphaned:1; /**< Whether the process group is orphaned */
131136
};
132137

133138
/**
134-
* Light-weight process structure
139+
* @brief Light-weight process structure
135140
*/
136141
struct rt_lwp
137142
{
138143
#ifdef ARCH_MM_MMU
139-
size_t end_heap; /* End address of heap */
140-
rt_aspace_t aspace; /* Address space associated with this LWP */
144+
size_t end_heap; /**< End address of heap */
145+
rt_aspace_t aspace; /**< Address space associated with this LWP */
141146
#else
142147
#ifdef ARCH_MM_MPU
143-
struct rt_mpu_info mpu_info; /* MPU information for this LWP */
148+
struct rt_mpu_info mpu_info; /**< MPU information for this LWP */
144149
#endif /* ARCH_MM_MPU */
145150
#endif /* ARCH_MM_MMU */
146151

147152
#ifdef RT_USING_SMP
148-
int bind_cpu; /* CPU ID to which the LWP is bound */
153+
int bind_cpu; /**< CPU ID to which the LWP is bound */
149154
#endif
150155

151-
uint8_t lwp_type; /* Type of LWP */
156+
uint8_t lwp_type; /**< Type of LWP */
152157
uint8_t reserv[3];
153158

154159
/* flags */
155-
unsigned int terminated:1; /* Process termination flag */
156-
unsigned int background:1; /* Background process flag */
157-
unsigned int term_ctrlterm:1; /* have control terminal? */
158-
unsigned int did_exec:1; /* Whether exec has been performed */
159-
unsigned int jobctl_stopped:1; /* job control: current proc is stopped */
160-
unsigned int wait_reap_stp:1; /* job control: has wait event for parent */
161-
unsigned int sig_protected:1; /* signal: protected proc cannot be killed or stopped */
162-
163-
struct rt_lwp *parent; /* parent process */
164-
struct rt_lwp *first_child; /* first child process */
165-
struct rt_lwp *sibling; /* sibling(child) process */
166-
167-
struct rt_wqueue waitpid_waiters; /* Wait queue for waitpid system call */
168-
lwp_status_t lwp_status; /* Status of LWP */
169-
170-
void *text_entry; /* Entry point of text segment */
171-
uint32_t text_size; /* Size of text segment */
172-
void *data_entry; /* Entry point of data segment */
173-
uint32_t data_size; /* Size of data segment */
174-
175-
rt_atomic_t ref; /* Reference count for LWP */
176-
void *args; /* Arguments passed to LWP */
177-
uint32_t args_length; /* Length of arguments */
178-
pid_t pid; /* Process ID */
179-
pid_t sid; /* session ID */
180-
pid_t pgid; /* process group ID */
160+
unsigned int terminated:1; /**< Process termination flag */
161+
unsigned int background:1; /**< Background process flag */
162+
unsigned int term_ctrlterm:1; /**< have control terminal? */
163+
unsigned int did_exec:1; /**< Whether exec has been performed */
164+
unsigned int jobctl_stopped:1; /**< job control: current proc is stopped */
165+
unsigned int wait_reap_stp:1; /**< job control: has wait event for parent */
166+
unsigned int sig_protected:1; /**< signal: protected proc cannot be killed or stopped */
167+
168+
struct rt_lwp *parent; /**< parent process */
169+
struct rt_lwp *first_child; /**< first child process */
170+
struct rt_lwp *sibling; /**< sibling(child) process */
171+
172+
struct rt_wqueue waitpid_waiters; /**< Wait queue for waitpid system call */
173+
lwp_status_t lwp_status; /**< Status of LWP */
174+
175+
void *text_entry; /**< Entry point of text segment */
176+
uint32_t text_size; /**< Size of text segment */
177+
void *data_entry; /**< Entry point of data segment */
178+
uint32_t data_size; /**< Size of data segment */
179+
180+
rt_atomic_t ref; /**< Reference count for LWP */
181+
void *args; /**< Arguments passed to LWP */
182+
uint32_t args_length; /**< Length of arguments */
183+
pid_t pid; /**< Process ID */
184+
pid_t sid; /**< session ID */
185+
pid_t pgid; /**< process group ID */
181186
struct rt_processgroup *pgrp;
182-
rt_list_t pgrp_node; /* process group node */
183-
rt_list_t t_grp; /* thread group */
184-
rt_list_t timer; /* POSIX timer object binding to a process */
187+
rt_list_t pgrp_node; /**< process group node */
188+
rt_list_t t_grp; /**< thread group */
189+
rt_list_t timer; /**< POSIX timer object binding to a process */
185190

186-
struct dfs_fdtable fdt; /* File descriptor table */
187-
char cmd[RT_NAME_MAX]; /* process name */
188-
char *exe_file; /* process file path */
191+
struct dfs_fdtable fdt; /**< File descriptor table */
192+
char cmd[RT_NAME_MAX]; /**< process name */
193+
char *exe_file; /**< process file path */
189194

190195
/* POSIX signal */
191-
struct lwp_signal signal; /* Signal handling structure */
196+
struct lwp_signal signal; /**< Signal handling structure */
192197

193-
struct lwp_avl_struct *object_root; /* AVL tree root for objects */
194-
struct rt_mutex object_mutex; /* Mutex for object operations synchronization */
195-
struct rt_user_context user_ctx; /* User context for LWP */
198+
struct lwp_avl_struct *object_root; /**< AVL tree root for objects */
199+
struct rt_mutex object_mutex; /**< Mutex for object operations synchronization */
200+
struct rt_user_context user_ctx; /**< User context for LWP */
196201

197-
struct rt_wqueue wait_queue; /* wait queue for console */
198-
struct tty_struct *tty; /* Controlling terminal, NULL if no tty */
202+
struct rt_wqueue wait_queue; /**< wait queue for console */
203+
struct tty_struct *tty; /**< Controlling terminal, NULL if no tty */
199204

200-
struct lwp_avl_struct *address_search_head; /* for addressed object fast search */
201-
char working_directory[DFS_PATH_MAX]; /* Current working directory */
205+
struct lwp_avl_struct *address_search_head; /**< for addressed object fast search */
206+
char working_directory[DFS_PATH_MAX]; /**< Current working directory */
202207

203-
int debug; /* Debug flag */
204-
rt_uint32_t bak_first_inst; /* backup of first instruction */
208+
int debug; /**< Debug flag */
209+
rt_uint32_t bak_first_inst; /**< backup of first instruction */
205210

206-
struct rt_mutex lwp_lock; /* Mutex for LWP operations synchronization */
211+
struct rt_mutex lwp_lock; /**< Mutex for LWP operations synchronization */
207212

208-
rt_slist_t signalfd_notify_head; /* Signal file descriptor notification head */
213+
rt_slist_t signalfd_notify_head; /**< Signal file descriptor notification head */
209214

210215
#ifdef LWP_ENABLE_ASID
211-
uint64_t generation; /* ASID generation */
212-
unsigned int asid; /* Address space ID */
216+
uint64_t generation; /**< ASID generation */
217+
unsigned int asid; /**< Address space ID */
213218
#endif
214-
struct rusage rt_rusage; /* Resource usage information */
219+
struct rusage rt_rusage; /**< Resource usage information */
215220

216221
#ifdef RT_USING_VDSO
217-
void *vdso_vbase; /* VDSO base address */
222+
void *vdso_vbase; /**< VDSO base address */
218223
#endif
219224
};
220225

@@ -223,11 +228,14 @@ struct rt_lwp *lwp_self(void);
223228
rt_err_t lwp_children_register(struct rt_lwp *parent, struct rt_lwp *child);
224229
rt_err_t lwp_children_unregister(struct rt_lwp *parent, struct rt_lwp *child);
225230

231+
/**
232+
* @brief LWP exit request type
233+
*/
226234
enum lwp_exit_request_type
227235
{
228-
LWP_EXIT_REQUEST_NONE = 0,
229-
LWP_EXIT_REQUEST_TRIGGERED,
230-
LWP_EXIT_REQUEST_IN_PROCESS,
236+
LWP_EXIT_REQUEST_NONE = 0, /**< No exit request */
237+
LWP_EXIT_REQUEST_TRIGGERED, /**< Exit request triggered */
238+
LWP_EXIT_REQUEST_IN_PROCESS, /**< Exit request in process */
231239
};
232240
struct termios *get_old_termios(void);
233241
void lwp_setcwd(char *buf);
@@ -397,36 +405,36 @@ sysret_t lwp_teardown(struct rt_lwp *lwp, void (*cb)(void));
397405
#define AT_SYSINFO_EHDR 33
398406

399407
/**
400-
* Process auxiliary vector item
408+
* @brief Process auxiliary vector item
401409
*/
402410
struct process_aux_item
403411
{
404-
size_t key;
405-
size_t value;
412+
size_t key; /**< Auxiliary vector key */
413+
size_t value; /**< Auxiliary vector value */
406414
};
407415

408416
/**
409-
* Process auxiliary vector
417+
* @brief Process auxiliary vector
410418
*/
411419
struct process_aux
412420
{
413-
struct process_aux_item item[AUX_ARRAY_ITEMS_NR];
421+
struct process_aux_item item[AUX_ARRAY_ITEMS_NR]; /**< Auxiliary vector items */
414422
};
415423

416424
/**
417-
* Debug operations structure
425+
* @brief Debug operations structure
418426
*/
419427
struct dbg_ops_t
420428
{
421-
int (*dbg)(int argc, char **argv); /* Debug function */
422-
uint32_t (*arch_get_ins)(void); /* Architecture-specific instruction getter */
423-
void (*arch_activate_step)(void); /* Architecture-specific step activation */
424-
void (*arch_deactivate_step)(void); /* Architecture-specific step deactivation */
425-
int (*check_debug_event)(struct rt_hw_exp_stack *regs, unsigned long esr); /* Debug event checker */
426-
rt_channel_t (*gdb_get_server_channel)(void); /* GDB server channel getter */
427-
int (*gdb_get_step_type)(void); /* GDB step type getter */
428-
void (*lwp_check_debug_attach_req)(void *pc); /* LWP debug attach request checker */
429-
int (*lwp_check_debug_suspend)(void); /* LWP debug suspend checker */
429+
int (*dbg)(int argc, char **argv); /**< Debug function */
430+
uint32_t (*arch_get_ins)(void); /**< Architecture-specific instruction getter */
431+
void (*arch_activate_step)(void); /**< Architecture-specific step activation */
432+
void (*arch_deactivate_step)(void); /**< Architecture-specific step deactivation */
433+
int (*check_debug_event)(struct rt_hw_exp_stack *regs, unsigned long esr); /**< Debug event checker */
434+
rt_channel_t (*gdb_get_server_channel)(void); /**< GDB server channel getter */
435+
int (*gdb_get_step_type)(void); /**< GDB step type getter */
436+
void (*lwp_check_debug_attach_req)(void *pc); /**< LWP debug attach request checker */
437+
int (*lwp_check_debug_suspend)(void); /**< LWP debug suspend checker */
430438
};
431439
extern struct dbg_ops_t *rt_dbg_ops;
432440

0 commit comments

Comments
 (0)