Exemplo n.º 1
0
 //go:nosplit
 //go:nowritebarrierrec
 private static ptr <regs64> regs(this ptr <sigctxt> _addr_c)
 {
     ref sigctxt c = ref _addr_c.val;
Exemplo n.º 2
0
Arquivo: main.cs Projeto: zjmit/go2cs
 private static (slice <byte>, error) gofmtFile(ptr <ast.File> _addr_f)
 {
     slice <byte> _p0 = default;
     error        _p0 = default !;
Exemplo n.º 3
0
 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;
 }
Exemplo n.º 4
0
 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;
 }
Exemplo 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;
 }
Exemplo 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._          = _;
 }
Exemplo n.º 9
0
 private static (ptr <ProcessState>, error) wait(this ptr <Process> _addr_p) => func((defer, _, __) =>
Exemplo n.º 10
0
 public D(long a = default, C C = default)
 {
     this.a      = a;
     this.m_CRef = new ptr <C>(C);
 }
Exemplo 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;
 }
Exemplo n.º 12
0
 public D(NilType _)
 {
     this.a      = default;
     this.m_CRef = new ptr <C>(new C(nil));
 }
Exemplo n.º 13
0
 private static error setIPv4MulticastInterface(ptr <netFD> _addr_fd, ptr <Interface> _addr_ifi)
 {
     ref netFD     fd  = ref _addr_fd.val;
Exemplo 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;
Exemplo 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;
Exemplo n.º 16
0
 public static Reader As <T>(ptr <T> target_ptr) =>
 (Reader <T>)target_ptr;
Exemplo 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;
 }
Exemplo 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;
 }
Exemplo 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;
Exemplo n.º 20
0
 private static (ptr <netFD>, error) newFD(long sysfd, long family, long sotype, @string net)
 {
     ptr <netFD> _p0 = default !;
Exemplo n.º 21
0
 public Iovec(ref ptr <byte> Base = default, ulong Len = default)
 {
     this.Base = Base;
     this.Len  = Len;
 }
Exemplo 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;
 }
Exemplo n.º 24
0
 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._ = _;
 }
Exemplo n.º 25
0
 public funcTypeFixed16(funcType funcType = default, array <ptr <rtype> > args = default)
 {
     this.m_funcTypeRef = new ptr <funcType>(funcType);
     this.args          = args;
 }
Exemplo n.º 26
0
 public pthreadattr(ref ptr <byte> __pthread_attrp = default)
 {
     this.__pthread_attrp = __pthread_attrp;
 }
Exemplo n.º 27
0
 public scase(ref ptr <hchan> c = default, unsafe.Pointer elem = default, ushort kind = default, System.UIntPtr pc = default, long releasetime = default)
Exemplo n.º 28
0
 private static void dumpregs(ptr <sigctxt> _addr_c)
 {
     ref sigctxt c = ref _addr_c.val;
Exemplo n.º 29
0
 //go:nosplit
 private static void setNsec(this ptr <timespec> _addr_ts, long ns)
 {
     ref timespec ts = ref _addr_ts.val;
Exemplo 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;
 }