Пример #1
0
        /// <summary>
        /// Transfer the given Allocation block to the target endpoint
        /// </summary>
        public static void TransferBlockOwnership(Allocation *ptr, ref EndpointCore target)
        {
            Allocation.SetOwnerProcessId(ptr, target.cachedOwnerProcessId);
            // TODO MAKE THIS APROPRIATE TO BOTH SINGLE AND PAGED IMPLS
            DeliveryImpl di = target.EndpointDeliveryImpl;

            VTable.Assert(di != null);
            //Monitoring.Log(Monitoring.Provider.ChannelService,
            //               (ushort)ChannelServiceEvent.TransferBlockOwnership, 0,
            //               (uint)di.ChannelId,
            //               (uint)di.ProcessId,
            //               0, 0, 0);
#if CHANNEL_COUNT
            IncreaseBytesSentCount((long)Allocation.GetSize(ptr));
#endif
            Allocation.SetOwnerProcessId(ptr, di.ProcessId);
        }