internal unsafe int Read(Thread current, out userdesc val) { userdesc v; var r = Read(current, &v, sizeof(userdesc)); val = v; return(r); }
public static int SetThreadArea(Thread current, UserPtr userDescriptor) { var info = new userdesc(); if (userDescriptor.Read(current, out info) != 0) { return(-ErrorCode.EFAULT); } var ret = NativeMethods.l4api_set_thread_area(current.impl._value.thread, current.TLSArray, -1, ref info, 1); if (userDescriptor.Write(current, info) != 0) { return(-ErrorCode.EFAULT); } return(ret); }
internal unsafe int Write(Thread current, userdesc r) { return Write(current, new Pointer(&r), sizeof(userdesc)); }
internal unsafe int Read(Thread current, out userdesc val) { userdesc v; var r = Read(current, &v, sizeof(userdesc)); val = v; return r; }
internal unsafe int Write(Thread current, userdesc r) { return(Write(current, new Pointer(&r), sizeof(userdesc))); }