ack/mach/minixST/libsys/_ptrace.c

20 lines
330 B
C
Raw Normal View History

#include <lib.h>
#define ptrace _ptrace
#include <unistd.h>
PUBLIC long ptrace(req, pid, addr, data)
int req, pid;
long addr, data;
{
_M.m2_i1 = pid;
_M.m2_i2 = req;
_M.m2_l1 = addr;
_M.m2_l2 = data;
if (_callx(MM, PTRACE) == -1) return(-1L);
if (_M.m2_l2 == -1) {
errno = 0;
return(-1L);
}
return(_M.m2_l2);
}