File tree Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -273,6 +273,10 @@ Tenok API List
273
273
274
274
## Kernel-space API
275
275
276
+ ### Kernel Thread
277
+
278
+ * kthread_create()
279
+
276
280
### Logging:
277
281
278
282
* printk()
Original file line number Diff line number Diff line change @@ -131,8 +131,6 @@ struct thread_info {
131
131
struct list_head list ; /* Link to a scheduling list */
132
132
};
133
133
134
- int kthread_create (task_func_t task_func , uint8_t priority , int stack_size );
135
-
136
134
struct task_struct * current_task_info (void );
137
135
struct thread_info * current_thread_info (void );
138
136
struct thread_info * acquire_thread (int tid );
Original file line number Diff line number Diff line change
1
+ /**
2
+ * @file
3
+ */
4
+ #ifndef __KTHREAD_H__
5
+ #define __KTHREAD_H__
6
+
7
+ #include <kernel/task.h>
8
+
9
+ /**
10
+ * @brief Create new kernel task
11
+ * @param task_func: Task function to run.
12
+ * @param priority: Priority of the task.
13
+ * @param stack_size: Stack size of the task.
14
+ * @retval int: The function return positive task pid number if
15
+ * success; otherwise it returns a negative error
16
+ * number.
17
+ */
18
+ int kthread_create (task_func_t task_func , uint8_t priority , int stack_size );
19
+
20
+ #endif
You can’t perform that action at this time.
0 commit comments