public static MixedContextWrapper *MoveToContext(MixedContextWrapper *context) { var addr = (MixedContextWrapper *) MallocFixedPageSize <MixedContextWrapper> .PhysicalInstance.Allocate(); Copy(context, addr); return(addr); }
public static void FreeFromContext(MixedContextWrapper *c) { #if BLIT_CONTEXT MallocFixedPageSize <MixedContextWrapper> .PhysicalInstance.FreeAtEpoch((long)c); #else ((BlittableTypeWrapper *)&c)->Free <MixedContext>(); #endif }
public static ref MixedContext Convert(MixedContextWrapper *c) { #if BLIT_CONTEXT && !GENERIC_BLIT_CONTEXT return(ref c->context); #elif BLIT_CONTEXT && GENERIC_BLIT_CONTEXT return(ref Unsafe.AsRef <MixedContext>(c)); #else return(ref ((BlittableTypeWrapper *)&c)->GetObject <MixedContext>()); #endif }
public static void UpsertCompletionCallback(MixedKeyWrapper *key, MixedValueWrapper *value, MixedContextWrapper *ctx) { userFunctions.UpsertCompletionCallback( UserType.Convert(ctx)); UserType.FreeFromContext(key); UserType.FreeFromContext(value); UserType.FreeFromContext(ctx); }
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); }
public static void Copy(MixedContextWrapper *src, MixedContextWrapper *dst) { dst->context = src->context; }