Esempio n. 1
0
 //go:nosplit
 //go:nowritebarrierrec
 private static ptr <regs64> regs(this ptr <sigctxt> _addr_c)
 {
     ref sigctxt c = ref _addr_c.val;
Esempio n. 2
0
File: main.cs Progetto: zjmit/go2cs
 private static (slice <byte>, error) gofmtFile(ptr <ast.File> _addr_f)
 {
     slice <byte> _p0 = default;
     error        _p0 = default !;
 public Protoent(ref ptr <byte> Name = default, ref ptr <ptr <byte> > Aliases = default, ushort Proto = default)
 {
     this.Name    = Name;
     this.Aliases = Aliases;
     this.Proto   = Proto;
 }
 public stackt(ref ptr <byte> ss_sp = default, int ss_flags = default, System.UIntPtr ss_size = default)
 {
     this.ss_sp    = ss_sp;
     this.ss_flags = ss_flags;
     this.ss_size  = ss_size;
 }
Esempio n. 5
0
 public funcTypeFixed16(NilType _)
 {
     this.m_funcTypeRef = new ptr <funcType>(new funcType(nil));
     this.args          = default;
 }
 public SockFprog(ushort Len = default, array <byte> _ = default, ref ptr <SockFilter> Filter = default)
 {
     this.Len    = Len;
     this._      = _;
     this.Filter = Filter;
 }
Esempio n. 7
0
 public Name(@string Go = default, @string Mangle = default, @string C = default, @string Define = default, @string Kind = default, ref ptr <Type> Type = default, ref ptr <FuncType> FuncType = default, bool AddError = default, @string Const = default)
 {
     this.Go       = Go;
     this.Mangle   = Mangle;
     this.C        = C;
     this.Define   = Define;
     this.Kind     = Kind;
     this.Type     = Type;
     this.FuncType = FuncType;
     this.AddError = AddError;
     this.Const    = Const;
 }
 public Msghdr(ref ptr <byte> Name = default, uint Namelen = default, ref ptr <Iovec> Iov = default, ulong Iovlen = default, ref ptr <byte> Control = default, ulong Controllen = default, int Flags = default, array <byte> _ = default)
 {
     this.Name       = Name;
     this.Namelen    = Namelen;
     this.Iov        = Iov;
     this.Iovlen     = Iovlen;
     this.Control    = Control;
     this.Controllen = Controllen;
     this.Flags      = Flags;
     this._          = _;
 }
Esempio n. 9
0
 private static (ptr <ProcessState>, error) wait(this ptr <Process> _addr_p) => func((defer, _, __) =>
Esempio n. 10
0
 public D(long a = default, C C = default)
 {
     this.a      = a;
     this.m_CRef = new ptr <C>(C);
 }
Esempio n. 11
0
 public BpfZbuf(ref ptr <byte> Bufa = default, ref ptr <byte> Bufb = default, ulong Buflen = default)
 {
     this.Bufa   = Bufa;
     this.Bufb   = Bufb;
     this.Buflen = Buflen;
 }
Esempio n. 12
0
 public D(NilType _)
 {
     this.a      = default;
     this.m_CRef = new ptr <C>(new C(nil));
 }
Esempio n. 13
0
 private static error setIPv4MulticastInterface(ptr <netFD> _addr_fd, ptr <Interface> _addr_ifi)
 {
     ref netFD     fd  = ref _addr_fd.val;
Esempio n. 14
0
 // Don't split the stack as this function may be invoked without a valid G,
 // which prevents us from allocating more stack.
 //go:nosplit
 private static unsafe.Pointer sysAlloc(System.UIntPtr n, ptr <ulong> _addr_sysStat)
 {
     ref ulong sysStat = ref _addr_sysStat.val;
Esempio n. 15
0
 public static void SetKevent(ptr <Kevent_t> _addr_k, long fd, long mode, long flags)
 {
     ref Kevent_t k = ref _addr_k.val;
Esempio n. 16
0
 public static Reader As <T>(ptr <T> target_ptr) =>
 (Reader <T>)target_ptr;
Esempio n. 17
0
 public vdsoInfo(bool valid = default, System.UIntPtr loadAddr = default, System.UIntPtr loadOffset = default, ref ptr <array <elfSym> > symtab = default, ref ptr <array <byte> > symstrings = default, slice <uint> chain = default, slice <uint> bucket = default, uint symOff = default, bool isGNUHash = default, ref ptr <array <ushort> > versym = default, ref ptr <elfVerdef> verdef = default)
 {
     this.valid      = valid;
     this.loadAddr   = loadAddr;
     this.loadOffset = loadOffset;
     this.symtab     = symtab;
     this.symstrings = symstrings;
     this.chain      = chain;
     this.bucket     = bucket;
     this.symOff     = symOff;
     this.isGNUHash  = isGNUHash;
     this.versym     = versym;
     this.verdef     = verdef;
 }
Esempio n. 18
0
 public Proc(ref ptr <DLL> Dll = default, @string Name = default, System.UIntPtr addr = default)
 {
     this.Dll  = Dll;
     this.Name = Name;
     this.addr = addr;
 }
Esempio n. 19
0
 // Fd returns the integer Unix file descriptor referencing the open file.
 // The file descriptor is valid only until f.Close is called or f is garbage collected.
 // On Unix systems this will cause the SetDeadline methods to stop working.
 private static System.UIntPtr Fd(this ptr <File> _addr_f)
 {
     ref File f = ref _addr_f.val;
Esempio n. 20
0
 private static (ptr <netFD>, error) newFD(long sysfd, long family, long sotype, @string net)
 {
     ptr <netFD> _p0 = default !;
Esempio n. 21
0
 public Iovec(ref ptr <byte> Base = default, ulong Len = default)
 {
     this.Base = Base;
     this.Len  = Len;
 }
Esempio n. 22
0
 public mSpanList(ref ptr <mspan> first = default, ref ptr <mspan> last = default)
 {
     this.first = first;
     this.last  = last;
 }
 public Kevent_t(uint Ident = default, short Filter = default, ushort Flags = default, uint Fflags = default, int Data = default, ref ptr <byte> Udata = default)
 {
     this.Ident  = Ident;
     this.Filter = Filter;
     this.Flags  = Flags;
     this.Fflags = Fflags;
     this.Data   = Data;
     this.Udata  = Udata;
 }
 public keventt(uint ident = default, uint filter = default, uint flags = default, uint fflags = default, long data = default, ref ptr<byte> udata = default, array<byte> _ = default)
 {
     this.ident = ident;
     this.filter = filter;
     this.flags = flags;
     this.fflags = fflags;
     this.data = data;
     this.udata = udata;
     this._ = _;
 }
Esempio n. 25
0
 public funcTypeFixed16(funcType funcType = default, array <ptr <rtype> > args = default)
 {
     this.m_funcTypeRef = new ptr <funcType>(funcType);
     this.args          = args;
 }
Esempio n. 26
0
 public pthreadattr(ref ptr <byte> __pthread_attrp = default)
 {
     this.__pthread_attrp = __pthread_attrp;
 }
Esempio n. 27
0
 public scase(ref ptr <hchan> c = default, unsafe.Pointer elem = default, ushort kind = default, System.UIntPtr pc = default, long releasetime = default)
Esempio n. 28
0
 private static void dumpregs(ptr <sigctxt> _addr_c)
 {
     ref sigctxt c = ref _addr_c.val;
Esempio n. 29
0
 //go:nosplit
 private static void setNsec(this ptr <timespec> _addr_ts, long ns)
 {
     ref timespec ts = ref _addr_ts.val;
Esempio n. 30
0
 public ProcAttr(@string Dir = default, slice <@string> Env = default, slice <ptr <File> > Files = default, ref ptr <syscall.SysProcAttr> Sys = default)
 {
     this.Dir   = Dir;
     this.Env   = Env;
     this.Files = Files;
     this.Sys   = Sys;
 }