Ejemplo n.º 1
0
        protected ZingEvent(ZingSourceContext context, ZingAttribute contextAttribute, int SerialNum)
        {
            this.context = context;
            this.contextAttribute = contextAttribute;

            Process p = Process.GetCurrentProcess(SerialNum);

            if (p != null)
            {
                procName = Utils.Unmangle(p.Name);
                stepNumber = p.StateImpl.stepNumber;
            }
            else
            {
                procName = "<init>";
            }
        }
Ejemplo n.º 2
0
 internal CreateProcessEvent(ZingSourceContext context, ZingAttribute contextAttribute,
     string newProcName, int SerialNumber)
     : base(context, contextAttribute, SerialNumber)
 {
     this.newProcName = Utils.Unmangle(newProcName);
 }
Ejemplo n.º 3
0
 internal TraceEvent(ZingSourceContext context, ZingAttribute contextAttribute,
     string message, int SerialNumber, params object[] arguments)
     : base(context, contextAttribute, SerialNumber)
 {
     this.message = message;
     this.arguments = arguments;
 }
Ejemplo n.º 4
0
 internal TerminateProcessEvent(ZingSourceContext context, ZingAttribute contextAttribute, int SerialNumber)
     : base(context, contextAttribute, SerialNumber)
 {
 }
Ejemplo n.º 5
0
 /// <exclude/>
 internal TerminateProcessEvent(ZingSourceContext context, ZingAttribute contextAttribute)
     : base(context, contextAttribute)
 {
 }
Ejemplo n.º 6
0
 internal SendEvent(ZingSourceContext context, ZingAttribute contextAttribute,
     ZingChan chan, object data, int SerialNumber)
     : base(context, contextAttribute, SerialNumber)
 {
     this.data = data;
     this.chanPtr = Process.GetCurrentProcess(SerialNumber).StateImpl.ReverseLookupObject(chan);
     this.chanType = chan.GetType();
 }
Ejemplo n.º 7
0
 /// <exclude/>
 internal ReceiveEvent(ZingSourceContext context, ZingAttribute contextAttribute,
     ZingChan chan, object data)
     : base(context, contextAttribute)
 {
     this.data = data;
     this.chanPtr = Process.CurrentProcess.StateImpl.ReverseLookupObject(chan);
     this.chanType = chan.GetType();
 }
Ejemplo n.º 8
0
        public void Return(ZingSourceContext context, ZingAttribute contextAttribute)
        {
            ZingMethod returningMethod = doPop();

            this.atomicityLevel = returningMethod.SavedAtomicityLevel;

            // Keep a ref to the completed function so the caller can access
            // the return value and output parameters.

            if (topOfStack != null)
                lastFunctionCompleted = returningMethod;
            else
            {
                lastFunctionCompleted = null;
                middleOfTransition = false;
            }

            if (this.topOfStack == null && ZingerConfiguration.ExecuteTraceStatements && (this.name != null && this.name.Length != 0))
            {
                if (ZingerConfiguration.DegreeOfParallelism == 1)
                {
                    this.StateImpl.ReportEvent(new TerminateProcessEvent(context, contextAttribute));
                }
                else
                {
                    this.StateImpl.ReportEvent(new TerminateProcessEvent(context, contextAttribute, this.MyThreadId));
                }
            }
        }