This commit is contained in:
rsc 2004-04-19 05:53:04 +00:00
parent 785a73647a
commit 905ca4e6dd
2 changed files with 18 additions and 14 deletions

View file

@ -1,6 +1,6 @@
.TH MACH-MAP 3 .TH MACH-MAP 3
.SH NAME .SH NAME
allocmap, addseg, addregseg, findseg, addrtoseg, allocmap, addseg, findseg, addrtoseg,
addrtosegafter, removeseg, freemap, addrtosegafter, removeseg, freemap,
get1, get2, get4, get8, get1, get2, get4, get8,
put1, put2, put4, put8, put1, put2, put4, put8,
@ -18,13 +18,13 @@ access to address spaces and register sets
.br .br
.B #include <mach.h> .B #include <mach.h>
.PP .PP
.B .ft B
.ta \w'\fBxxxxxx'u +\w'xxxxxxx'u .ta \w'\fBxxxxxx'u +\w'xxxxxxx'u
.nf .nf
typedef struct Map Map; typedef struct Map Map;
typedef struct Seg Seg; typedef struct Seg Seg;
.PP .PP
.B .ft B
.nf .nf
struct Seg struct Seg
{ {
@ -37,7 +37,7 @@ struct Seg
int (*rw)(Map*, Seg*, ulong, void*, uint, int); int (*rw)(Map*, Seg*, ulong, void*, uint, int);
}; };
.PP .PP
.B .ft B
.nf .nf
struct Map struct Map
{ {
@ -46,7 +46,7 @@ struct Map
\fI...\fR \fI...\fR
}; };
.PP .PP
.B .ft B
Map *allocmap(void) Map *allocmap(void)
.br .br
int addseg(Map *map, Seg seg) int addseg(Map *map, Seg seg)
@ -61,7 +61,7 @@ void removeseg(Map *map, int i)
.br .br
void freemap(Map *map) void freemap(Map *map)
.PP .PP
.B .ft B
int get1(Map *map, ulong addr, uchar *a, uint n) int get1(Map *map, ulong addr, uchar *a, uint n)
.br .br
int get2(Map *map, ulong addr, u16int *u) int get2(Map *map, ulong addr, u16int *u)
@ -70,7 +70,7 @@ int get4(Map *map, ulong addr, u32int *u)
.br .br
int get8(Map *map, ulong addr, u64int *u) int get8(Map *map, ulong addr, u64int *u)
.PP .PP
.B .ft B
int put1(Map *map, ulong addr, uchar *a, uint n) int put1(Map *map, ulong addr, uchar *a, uint n)
.br .br
int put2(Map *map, ulong addr, u16int u) int put2(Map *map, ulong addr, u16int u)
@ -79,7 +79,7 @@ int put4(Map *map, ulong addr, u32int u)
.br .br
int put8(Map *map, ulong addr, u64int u) int put8(Map *map, ulong addr, u64int u)
.PP .PP
.B .ft B
int rget1(Map *map, char *reg, u8int *u) int rget1(Map *map, char *reg, u8int *u)
.br .br
int rget2(Map *map, char *reg, u16int *u) int rget2(Map *map, char *reg, u16int *u)
@ -90,7 +90,7 @@ int rget8(Map *map, char *reg, u64int *u)
.br .br
int fpformat(Map *map, char *reg, char *a, uint n, char code); int fpformat(Map *map, char *reg, char *a, uint n, char code);
.PP .PP
.B .ft B
int rput1(Map *map, char *reg, u8int u) int rput1(Map *map, char *reg, u8int u)
.br .br
int rput2(Map *map, char *reg, u16int u) int rput2(Map *map, char *reg, u16int u)
@ -99,7 +99,7 @@ int rput4(Map *map, char *reg, u32int u)
.br .br
int rput8(Map *map, char *reg, u64int u) int rput8(Map *map, char *reg, u64int u)
.PP .PP
.B .ft B
Loc locaddr(ulong addr) Loc locaddr(ulong addr)
.br .br
Loc locconst(ulong con) Loc locconst(ulong con)
@ -108,7 +108,7 @@ Loc locreg(char *reg)
.br .br
Loc locindir(char *reg, long offset) Loc locindir(char *reg, long offset)
.PP .PP
.B .ft B
int loccmp(Loc *a, Loc *b) int loccmp(Loc *a, Loc *b)
.br .br
int loceval(Map *map, Loc loc, ulong *addr) int loceval(Map *map, Loc loc, ulong *addr)
@ -117,7 +117,7 @@ int locfmt(Fmt *fmt)
.br .br
int locredir(Map *map, Loc *regs, Loc loc, Loc *newloc) int locredir(Map *map, Loc *regs, Loc loc, Loc *newloc)
.PP .PP
.B .ft B
int lget1(Map *map, Loc loc, uchar *a, uint n) int lget1(Map *map, Loc loc, uchar *a, uint n)
.br .br
int lget2(Map *map, Loc loc, u16int *u) int lget2(Map *map, Loc loc, u16int *u)
@ -126,7 +126,7 @@ int lget4(Map *map, Loc loc, u32int *u)
.br .br
int lget8(Map *map, Loc loc, u64int *u) int lget8(Map *map, Loc loc, u64int *u)
.PP .PP
.B .ft B
int lput1(Map *map, Loc loc, uchar *a, uint n) int lput1(Map *map, Loc loc, uchar *a, uint n)
.br .br
int lput2(Map *map, Loc loc, u16int u) int lput2(Map *map, Loc loc, u16int u)
@ -413,7 +413,8 @@ function families as necessary.
.SH SOURCE .SH SOURCE
.B /sys/src/libmach .B /sys/src/libmach
.SH "SEE ALSO" .SH "SEE ALSO"
.IR mach(3), mach-file(3) .IR mach (3),
.IR mach-file (3)
.SH DIAGNOSTICS .SH DIAGNOSTICS
These routines set These routines set
.IR errstr . .IR errstr .

View file

@ -125,6 +125,9 @@ automatic (local) variable symbol
.TP .TP
.B p .B p
function parameter symbol function parameter symbol
.TP
.B U
undefined symbol
.RE .RE
.PD .PD
.LP .LP