+.Pp
+The
+.Fn renameat
+system call is equivalent to
+.Fn rename
+except in the case where either
+.Fa from
+or
+.Fa to
+specifies a relative path.
+If
+.Fa from
+is a relative path, the file to be renamed is located
+relative to the directory associated with the file descriptor
+.Fa fromfd
+instead of the current working directory.
+If the
+.Fa to
+is a relative path, the same happens only relative to the directory associated
+with
+.Fa tofd .
+If the
+.Fn renameat
+is passed the special value
+.Dv AT_FDCWD
+in the
+.Fa fromfd
+or
+.Fa tofd
+parameter, the current working directory is used in the determination
+of the file for the respective path parameter.
+.Pp
+The
+.Fn renamex_np
+and
+.Fn renameatx_np
+system calls are similar to their counterparts except that they take a
+.Fa flags
+argument.
+Values for
+.Fa flags
+are constructed with below bits set:
+.Bl -tag -offset indent
+.It Dv RENAME_SWAP
+On file systems that support it (see
+.Xr getattrlist 2
+.Dv VOL_CAP_INT_RENAME_SWAP Ns ),
+it will cause the source and target to be atomically swapped. Source and target need not be of
+the same type, i.e. it is possible to swap a file with a directory.
+EINVAL is returned in case of bitwise-inclusive OR with
+.Dv RENAME_EXCL .
+.It Dv RENAME_EXCL
+On file systems that support it (see
+.Xr getattrlist 2
+.Dv VOL_CAP_INT_RENAME_EXCL Ns ),
+it will cause
+.Dv EEXIST
+to be returned if the destination already exists. EINVAL is returned in case of bitwise-inclusive OR with
+.Dv RENAME_SWAP .
+.El