1FETCHI(2)                     System Calls Manual                    FETCHI(2)
2
3
4

NAME

6       fetchi - fetch from user instruction space (2BSD)
7

SYNOPSIS

9       fetchi(addr)
10       int *addr;
11

DESCRIPTION

13       Fetchi  fetches  the  word at addr from the caller's instruction space.
14       This system call is required on PDP-11's with separate instruction  and
15       data spaces because the mfpi instruction reads from D-space if the cur‐
16       rent and previous modes in the program status word are both user.
17

RETURN VALUE

19       Upon successful completion the contents  of  the  caller's  instruction
20       space at addr are returned.  Otherwise, a value of -1 is returned.
21

ERRORS

23       [EINVAL]       The  kernel  has  not been compiled for a processor with
24                      separate I/D.
25
26       [EFAULT]       Addr points to an address not in the process's allocated
27                      instruction space.
28

BUGS

30       The  error  indication, -1, is a legitimate function value; errno, (see
31       intro(2)), can be used to disambiguate.
32
33       Fetchi is a kludge and exists only to circumvent  an  alleged  security
34       feature on some DEC PDP-11 processors.
35
36       Fetchi is unique to the PDP-11 and 2BSD; its use is discouraged.
37
38
39
403rd Berkeley Distribution      January 22, 1987                      FETCHI(2)
Impressum