Moving to using reference counts for process and thread structures.
This commit is contained in:
parent
2447babe6a
commit
63c04f37df
@ -75,14 +75,18 @@ void Thread_Init();
|
||||
|
||||
// Process functions
|
||||
Process *Process_Create();
|
||||
void Process_Destroy(Process *proc);
|
||||
Process *Process_Lookup(uint64_t pid);
|
||||
void Process_Retain(Process *proc);
|
||||
void Process_Release(Process *proc);
|
||||
uint64_t Process_Wait(Process *proc);
|
||||
|
||||
// Thread functions
|
||||
Thread *Thread_Create(Process *proc);
|
||||
Thread *Thread_KThreadCreate(void (*f)(void*), void *arg);
|
||||
Thread *Thread_UThreadCreate(Thread *oldThr, uint64_t rip, uint64_t arg);
|
||||
void Thread_Destroy(Thread *thr);
|
||||
Thread *Thread_Lookup(Process *proc, uint64_t tid);
|
||||
void Thread_Retain(Thread *thr);
|
||||
void Thread_Release(Thread *thr);
|
||||
uint64_t Thread_Wait(Thread *thr, uint64_t tid);
|
||||
|
||||
// Scheduler functions
|
||||
|
@ -92,11 +92,26 @@ Process_Create()
|
||||
return proc;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
Process_Destroy(Process *proc)
|
||||
{
|
||||
}
|
||||
|
||||
Process *
|
||||
Process_Lookup(uint64_t pid)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
Process_Retain(Process *proc)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
Process_Release(Process *proc)
|
||||
{
|
||||
}
|
||||
|
||||
uint64_t
|
||||
Process_Wait(Process *proc)
|
||||
{
|
||||
@ -204,7 +219,7 @@ Thread_UThreadCreate(Thread *oldThr, uint64_t rip, uint64_t arg)
|
||||
return thr;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
Thread_Destroy(Thread *thr)
|
||||
{
|
||||
// Free userspace stack
|
||||
@ -219,6 +234,21 @@ Thread_Destroy(Thread *thr)
|
||||
Slab_Free(&threadSlab, thr);
|
||||
}
|
||||
|
||||
Thread *
|
||||
Thread_Lookup(Process *proc, uint64_t tid)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
Thread_Retain(Thread *thr)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
Thread_Release(Thread *thr)
|
||||
{
|
||||
}
|
||||
|
||||
uint64_t
|
||||
Thread_Wait(Thread *thr, uint64_t tid)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user