NAME
store
, casu32
,
casu64
, subyte
,
suword32
, suword64
—
store data to user-space
SYNOPSIS
#include
<sys/types.h>
#include <sys/time.h>
#include <sys/systm.h>
#include
<sys/resourcevar.h>
uint32_t
casu32
(volatile
uint32_t *p, uint32_t
oldval, uint32_t
newval);
uint64_t
casu64
(volatile
uint64_t *p, uint64_t
oldval, uint64_t
newval);
int
subyte
(uint8_t
*base, uint8_t
byte);
int
suword32
(uint32_t
*base, int
word);
int
suword64
(uint64_t
*base, uint64_t
word);
DESCRIPTION
Thestore
functions are designed to copy small amounts
of data to user-space.
The store
routines provide the following
functionality:
casu32
()- Compares the 32 bit oldval with the 32 bits at base, and if equal, base is set to newval. The old value at base is then returned.
casu64
()- Compares the 64 bit oldval with the 64 bits at base, and if equal, base is set to newval. The old value at base is then returned.
subyte
()- Stores a byte of data to the user-space address base.
suword32
()- Stores 32 bits of data to the user-space address base.
suword64
()- Stores 64 bits of data to the user-space address base.
RETURN VALUES
The store
functions return 0 on success or
-1 on failure.