return newThread->TID;
}
+#if 0
+tPID Proc_NewProcess(Uint Flags, void (*Fcn)(void*), size_t SaveSize, const void *Data)
+{
+ tThread *newThread = Threads_CloneTCB(CLONE_VM);
+ return 0;
+}
+#endif
+
/**
* \fn int Proc_Clone(Uint *Err, Uint Flags)
* \brief Clone the current process
// New thread
newThread = Threads_CloneTCB(Flags);
if(!newThread) return -1;
+ ASSERT(newThread->Process);
+ //ASSERT(CheckMem(newThread->Process, sizeof(tProcess)));
+ //LOG("newThread->Process = %p", newThread->Process);
newThread->KernelStack = cur->KernelStack;
if( eip == 0 ) {
return 0;
}
+ //ASSERT(newThread->Process);
+ //ASSERT(CheckMem(newThread->Process, sizeof(tProcess)));
+ //LOG("newThread->Process = %p", newThread->Process);
newThread->SavedState.EIP = eip;
newThread->SavedState.SSE = NULL;
newThread->SavedState.bSSEModified = 0;