.\" Automatically generated by Pandoc 2.17.1.1
.\"
.\" Define V font for inline verbatim, using C font in formats
.\" that render this, and otherwise B font.
.ie "\f[CB]x\f[]"x" \{\
. ftr V B
. ftr VI BI
. ftr VB B
. ftr VBI BI
.\}
.el \{\
. ftr V CR
. ftr VI CI
. ftr VB CB
. ftr VBI CBI
.\}
.TH "IBV_IS_FORK_INITIALIZED" "3" "2020-10-09" "libibverbs" "Libibverbs Programmer\[cq]s Manual"
.hy
.SH NAME
.PP
ibv_is_fork_initialized - check if fork support (ibv_fork_init) is
enabled
.SH SYNOPSIS
.IP
.nf
\f[C]
#include <infiniband/verbs.h>

enum ibv_fork_status {
    IBV_FORK_DISABLED,
    IBV_FORK_ENABLED,
    IBV_FORK_UNNEEDED,
};

enum ibv_fork_status ibv_is_fork_initialized(void);
\f[R]
.fi
.SH DESCRIPTION
.PP
\f[B]ibv_is_fork_initialized()\f[R] checks whether libibverbs
\f[B]fork()\f[R] support was enabled through the
\f[B]ibv_fork_init()\f[R] verb.
.SH RETURN VALUE
.PP
\f[B]ibv_is_fork_initialized()\f[R] returns IBV_FORK_DISABLED if fork
support is disabled, or IBV_FORK_ENABLED if enabled.
IBV_FORK_UNNEEDED return value indicates that the kernel copies DMA
pages on fork, hence a call to \f[B]ibv_fork_init()\f[R] is unneeded.
.SH NOTES
.PP
The IBV_FORK_UNNEEDED return value takes precedence over
IBV_FORK_DISABLED and IBV_FORK_ENABLED.
If the kernel supports copy-on-fork for DMA pages then IBV_FORK_UNNEEDED
will be returned regardless of whether \f[B]ibv_fork_init()\f[R] was
called or not.
.SH SEE ALSO
.PP
\f[B]fork\f[R](2), \f[B]ibv_fork_init\f[R](3)
.SH AUTHOR
.PP
Gal Pressman <galpress@amazon.com>
