Example #1
0
        public static void Pop()
        {
            Debug.Assert(threadLocal != null);

            CILThreadLocalStorage temp = threadLocal;

            threadLocal = threadLocal.previous;

            temp.previous  = threadFreeList;
            threadFreeList = temp;
        }
Example #2
0
        private void Init(
            PcodeSystem.IEvaluationContext EvaluationContext,
            IntPtr[] FunctionPointers,
            int[] FunctionSignatures,
            CILThreadLocalStorage previous)
        {
            this.EvaluationContext  = EvaluationContext;
            this.FunctionPointers   = FunctionPointers;
            this.FunctionSignatures = FunctionSignatures;

            this.previous = previous;
        }
Example #3
0
        public static void Push(
            PcodeSystem.IEvaluationContext EvaluationContext,
            IntPtr[] FunctionPointers,
            int[] FunctionSignatures)
        {
            CILThreadLocalStorage top = threadFreeList;

            if (top == null)
            {
                top = new CILThreadLocalStorage();
            }
            else
            {
                threadFreeList = threadFreeList.previous;
            }
            top.Init(EvaluationContext, FunctionPointers, FunctionSignatures, threadLocal);
            threadLocal = top;
        }