void *
ras_lookup(struct proc *p, void *addr)
int
ras_fork(struct proc *p1, struct proc *p2)
int
ras_purgeall(struct proc *p)
The RAS functionality is provided by a combination of the
machine-independent routines discussed in this page and
a machine-dependent component in
cpu_switch(9).
A port which supports restartable atomic sequences will define
__HAVE_RAS in
machine/types.h
for machine-independent code to conditionally provide RAS support.
A complicated side-effect of restartable atomic sequences is their interaction with the machine-dependent ptrace(2) support. Specifically, single-step traps and/or the emulation of single-stepping must carefully consider the effect on restartable atomic sequences. A general solution is to ignore these traps or disable them within restartable atomic sequences.
p, addr)p
which contain the user address
addr.
If the address
addr
is found within a RAS, then the restart address of the RAS is
returned, otherwise -1 is returned.
p1, p2)p1
to process
p2.
It is primarily called from
fork1(9)
when the sequences are inherited from the parent by the child.
p)p.
It is primarily used to remove all registered restartable atomic
sequences for a process during
exec(3)
and by
rasctl(2).
/usr/src.
The RAS framework itself is implemented within the file
sys/kern/kern_ras.c.
Data structures and function prototypes for the framework are located
in
sys/sys/ras.h.
Machine-dependent portions are implemented within
cpu_switch(9)
in the machine-dependent file
sys/arch/<arch>/<arch>/locore.S.