Пример #1
0
        internal static OpenFileCompletion OpenAndGetSizeAsync(Thread current, byte[] filename, int flags, int mode)
        {
            ArchDefinition.Assert(filename[filename.Length - 1] == 0);
            var buf = Globals.AllocateAlignedCompletionBuffer(filename.Length);

            if (!buf.isValid)
            {
                return(null);
            }

            buf.CopyFrom(0, filename);

            var completion = new OpenFileCompletion(current, GenericINode.INodeKind.ArchINodeKind, buf, flags, mode);

            IPCStubs.OpenAndGetSizeAsync(current.Parent.helperPid, current.impl._value.thread._value, new Pointer(completion.buf.Location), flags, mode);
            return(completion);
        }