.\" Extracted by src2man from /build/rpma-J76meX/rpma-0.12.0/src/include/librpma.h .\" Text automatically generated by txt2man .TH rpma_write_atomic 3 "22 February 2022" "RPMA" "RPMA Programmer's Manual" .SH NAME \fBrpma_write_atomic \fP- initiate the atomic write operation .SH SYNOPSIS .nf .fam C #include struct rpma_conn; struct rpma_mr_local; struct rpma_mr_remote; int \fBrpma_write_atomic\fP(struct rpma_conn *conn, struct rpma_mr_remote *dst, size_t dst_offset, const struct rpma_mr_local *src, size_t src_offset, int flags, const void *op_context); .fam T .fi .fam T .fi .SH DESCRIPTION \fBrpma_write_atomic\fP() initiates the atomic write operation (transferring data from the local memory to the remote memory). The atomic write operation allows transferring 8 bytes of data (RPMA_ATOMIC_WRITE_ALIGNMENT) and storing them atomically in the remote memory. .PP The attribute flags set the completion notification indicator: .IP \(bu 3 RPMA_F_COMPLETION_ON_ERROR - generate the completion on error .IP \(bu 3 RPMA_F_COMPLETION_ALWAYS - generate the completion regardless of result of the operation. .PP op_context is returned in the wr_id field of the completion (struct ibv_wc). .SH RETURN VALUE The \fBrpma_write_atomic\fP() function returns 0 on success or a negative error code on failure. .SH ERRORS \fBrpma_write_atomic\fP() can fail with the following errors: .IP \(bu 3 RPMA_E_INVAL - conn, dst or src is NULL .IP \(bu 3 RPMA_E_INVAL - dst_offset is not aligned to 8 bytes .IP \(bu 3 RPMA_E_INVAL - flags are not set .IP \(bu 3 RPMA_E_PROVIDER - \fBibv_post_send\fP(3) failed .SH SEE ALSO \fBrpma_conn_req_connect\fP(3), \fBrpma_mr_reg\fP(3), \fBrpma_mr_remote_from_descriptor\fP(3), \fBlibrpma\fP(7) and https://pmem.io/rpma/