示例#1
0
        public static MixedOutputWrapper *MoveToContext(MixedOutputWrapper *output)
        {
            var addr = (MixedOutputWrapper *)
                       MallocFixedPageSize <MixedOutputWrapper> .PhysicalInstance.Allocate();

            return(addr);
        }
示例#2
0
        public static void FreeFromContext(MixedOutputWrapper *o)
        {
#if BLIT_OUTPUT
            MallocFixedPageSize <MixedOutputWrapper> .PhysicalInstance.FreeAtEpoch((long)o);
#else
            ((BlittableTypeWrapper *)&o)->Free <MixedOutput>();
#endif
        }
示例#3
0
        public static ref MixedOutput Convert(MixedOutputWrapper *o)
        {
#if BLIT_OUTPUT && !GENERIC_BLIT_OUTPUT
            return(ref o->output);
#elif BLIT_OUTPUT && GENERIC_BLIT_OUTPUT
            return(ref Unsafe.AsRef <MixedOutput>(o));
#else
            return(ref ((BlittableTypeWrapper *)&o)->GetObject <MixedOutput>());
#endif
        }
示例#4
0
        public static void ConcurrentReader(MixedKeyWrapper *key, MixedInputWrapper *input, MixedValueWrapper *value, MixedOutputWrapper *dst)
        {
            MixedValueWrapper.AcquireReadLock(value);

            userFunctions.Reader(
                UserType.Convert(key),
                UserType.Convert(input),
                UserType.Convert(value),
                ref UserType.Convert(dst));

            MixedValueWrapper.ReleaseReadLock(value);
        }
示例#5
0
 public static void SingleReader(MixedKeyWrapper *key, MixedInputWrapper *input, MixedValueWrapper *value, MixedOutputWrapper *dst)
 {
     userFunctions.Reader(
         UserType.Convert(key),
         UserType.Convert(input),
         UserType.Convert(value),
         ref UserType.Convert(dst));
 }
示例#6
0
        public static void ReadCompletionCallback(MixedKeyWrapper *key, MixedInputWrapper *input, MixedOutputWrapper *output, MixedContextWrapper *ctx, Status status)
        {
            userFunctions.ReadCompletionCallback(
                UserType.Convert(ctx),
                UserType.Convert(output), status);

            UserType.FreeFromContext(key);
            UserType.FreeFromContext(input);
            UserType.FreeFromContext(output);
            UserType.FreeFromContext(ctx);
        }