Exemplo n.º 1
0
 /// <summary>
 /// Create a new thread based on the information in the thread object
 /// </summary>
 /// <param name="systemState">The State from which this thread is created</param>
 /// <param name="threadobj">The thread object containing information to initialize this thread</param>
 public ThreadState(State systemState, VMValue_thread threadobj)
 {
     this.systemState = systemState;
     VMValue_threadstart ts = (VMValue_threadstart)GetValue(threadobj.ThreadStartGUID);
     VMValue_object startingObject = (VMValue_object)systemState.Values.MakeValue(GetValue(ts.ObjGUID));
     startingObject.ValueGUID = ((VMValue_object)GetValue(ts.ObjGUID)).ValueGUID;
     startingObject.IsConcrete = true;
     startingObject.IsThreadLocal = true;
     //			VMValue_object startingObject = (VMValue_object)GetValue(ts.ObjGUID);
     VMValue_ftn ftn = (VMValue_ftn)GetValue(ts.FtnGUID);
     InitializeThread(threadobj.GUID, startingObject, ftn.Method);
 }
Exemplo n.º 2
0
 public VMValue_thread MakeThreadValue(VMValue_threadstart threadStart)
 {
     int guid = nextguid++;
     VMValue_thread ret = new VMValue_thread(guid, this, threadStart.GUID);
     allValues.Add(guid, ret);
     return ret;
 }
Exemplo n.º 3
0
 public override VMValue Duplicate()
 {
     VMValue_thread ret = new VMValue_thread();
     ret.CopyInternalData(this);
     return ret;
 }