Changeset View
Changeset View
Standalone View
Standalone View
share/man/man9/store.9
Show All 28 Lines | |||||
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED | ||||
.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||||
.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd April 17, 2018 | .Dd July 22, 2021 | ||||
.Dt STORE 9 | .Dt STORE 9 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm store , | .Nm store , | ||||
.Nm subyte , | .Nm subyte , | ||||
.Nm suword | .Nm suword | ||||
.Nd store data to user-space | .Nd store data to user-space | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
Show All 9 Lines | |||||
.Ft int | .Ft int | ||||
.Fn suword32 "volatile void *base" "int32_t word" | .Fn suword32 "volatile void *base" "int32_t word" | ||||
.Ft int | .Ft int | ||||
.Fn suword64 "volatile void *base" "int64_t word" | .Fn suword64 "volatile void *base" "int64_t word" | ||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||
The | The | ||||
.Nm | .Nm | ||||
functions are designed to copy small amounts of data to user-space. | functions are designed to copy small amounts of data to user-space. | ||||
If write is successful, it is performed atomically. | If the user address is naturally aligned, then the operation will be | ||||
The data written must be naturally aligned. | performed atomically. | ||||
Otherwise it may fail or be performed non-atomically, depending on | |||||
the platform. | |||||
.Pp | .Pp | ||||
The | The | ||||
.Nm | .Nm | ||||
routines provide the following functionality: | routines provide the following functionality: | ||||
.Bl -tag -width "suword64()" | .Bl -tag -width "suword64()" | ||||
.It Fn subyte | .It Fn subyte | ||||
Stores a byte of data to the user-space address | Stores a byte of data to the user-space address | ||||
.Pa base . | .Pa base . | ||||
Show All 20 Lines |