ptos: ps+hal: Add thread control block init
Signed-off-by: Chloe M <chloe@mensia.org>
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#define _PS_THREAD_H_ 1
|
||||
|
||||
#include <ptapi/status.h>
|
||||
#include <hal/tcb.h>
|
||||
#include <ptdef.h>
|
||||
#include <queue.h>
|
||||
|
||||
@@ -22,11 +23,15 @@ struct _PROCESS;
|
||||
* processes.
|
||||
*
|
||||
* @Tid: Thread ID
|
||||
* @Tcb: Thread control block
|
||||
* @StackBase: Execution stack base
|
||||
* @Parent: Parent process
|
||||
* @ThreadLink: Thread queue link
|
||||
*/
|
||||
typedef struct _THREAD {
|
||||
UQUAD Tid;
|
||||
TCB Tcb;
|
||||
UPTR StackBase;
|
||||
struct _PROCESS *Parent;
|
||||
TAILQ_ENTRY(_THREAD) ThreadLink;
|
||||
} THREAD;
|
||||
@@ -36,8 +41,12 @@ typedef struct _THREAD {
|
||||
*
|
||||
* @Parent: Parent of thread to create
|
||||
* @Flags: Optional init flags
|
||||
* @Ip: Instruction pointer value to start off with
|
||||
* @Result: Result is written here
|
||||
*/
|
||||
PT_STATUS PsCreateThread(struct _PROCESS *Parent, ULONG Flags, THREAD **Result);
|
||||
PT_STATUS PsCreateThread(
|
||||
struct _PROCESS *Parent, ULONG Flags,
|
||||
UPTR Ip, THREAD **Result
|
||||
);
|
||||
|
||||
#endif /* !_PS_THREAD_H_ */
|
||||
|
||||
Reference in New Issue
Block a user