RAS(9) | Kernel Developer's Manual | RAS(9) |
ras_lookup
, ras_fork
,
ras_purgeall
—
#include <sys/types.h>
#include <sys/proc.h>
#include <sys/ras.h>
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_switchto(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.
ras_lookup
(p,
addr)ras_fork
(p1,
p2)ras_purgeall
(p)<sys/ras.h>
. Machine-dependent
portions are implemented within
cpu_switchto(9) in the
machine-dependent file
sys/arch/<arch>/<arch>/locore.S.
Gregory McGarry, An Implementation of User-level Restartable Atomic Sequences on the NetBSD Operating System, Proceedings of the FREENIX Track: 2003 USENIX Annual Technical Conference, USENIX Association, http://www.usenix.org/publications/library/proceedings/usenix03/tech/freenix03/full_papers/mcgarry/mcgarry.pdf, 311-322, June 9-14, 2003.
April 17, 2010 | NetBSD 9.2 |