diff options
Diffstat (limited to 'lib/libsys')
| -rw-r--r-- | lib/libsys/_libsys.h | 3 | ||||
| -rw-r--r-- | lib/libsys/closefrom.2 | 7 | ||||
| -rw-r--r-- | lib/libsys/getrlimitusage.2 | 4 | ||||
| -rw-r--r-- | lib/libsys/revoke.2 | 4 | ||||
| -rw-r--r-- | lib/libsys/syscalls.map | 2 | ||||
| -rw-r--r-- | lib/libsys/write.2 | 20 | 
6 files changed, 35 insertions, 5 deletions
| diff --git a/lib/libsys/_libsys.h b/lib/libsys/_libsys.h index 6bd768708a78..12417b572a60 100644 --- a/lib/libsys/_libsys.h +++ b/lib/libsys/_libsys.h @@ -32,6 +32,7 @@ struct itimerspec;  struct itimerval;  struct jail;  struct kevent; +struct kexec_segment;  struct kld_file_stat;  struct mac;  struct module_stat; @@ -470,6 +471,7 @@ typedef int (__sys_getgroups_t)(int, gid_t *);  typedef int (__sys_setgroups_t)(int, const gid_t *);  typedef int (__sys_jail_attach_jd_t)(int);  typedef int (__sys_jail_remove_jd_t)(int); +typedef int (__sys_kexec_load_t)(uint64_t, u_long, struct kexec_segment *, u_long);  _Noreturn void __sys__exit(int rval);  int __sys_fork(void); @@ -876,6 +878,7 @@ int __sys_getgroups(int gidsetsize, gid_t * gidset);  int __sys_setgroups(int gidsetsize, const gid_t * gidset);  int __sys_jail_attach_jd(int fd);  int __sys_jail_remove_jd(int fd); +int __sys_kexec_load(uint64_t entry, u_long nseg, struct kexec_segment * segments, u_long flags);  __END_DECLS  #endif /* __LIBSYS_H_ */ diff --git a/lib/libsys/closefrom.2 b/lib/libsys/closefrom.2 index 1885a6fdeaa8..e6b4a5a3e9d7 100644 --- a/lib/libsys/closefrom.2 +++ b/lib/libsys/closefrom.2 @@ -23,7 +23,7 @@  .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF  .\" SUCH DAMAGE.  .\" -.Dd May 17, 2025 +.Dd October 27, 2025  .Dt CLOSEFROM 2  .Os  .Sh NAME @@ -94,6 +94,11 @@ function first appeared in  .Fx 8.0 .  .Pp  The +.Fn close_range +function first appeared in +.Fx 12.2 . +.Pp +The  .Dv CLOSE_RANGE_CLOFORK  flag appeared in  .Fx 15.0 . diff --git a/lib/libsys/getrlimitusage.2 b/lib/libsys/getrlimitusage.2 index e2114def56c2..d0e92d7f88b4 100644 --- a/lib/libsys/getrlimitusage.2 +++ b/lib/libsys/getrlimitusage.2 @@ -25,7 +25,7 @@  .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF  .\" SUCH DAMAGE.  .\" -.Dd September 27, 2024 +.Dd October 24, 2025  .Dt GETRLIMITUSAGE 2  .Os  .Sh NAME @@ -97,4 +97,4 @@ and  The  .Fn getrlimitusage  system call appeared in -.Bx 15.0 . +.Fx 14.2 . diff --git a/lib/libsys/revoke.2 b/lib/libsys/revoke.2 index f5ae1e92c357..938d2f083e27 100644 --- a/lib/libsys/revoke.2 +++ b/lib/libsys/revoke.2 @@ -28,7 +28,7 @@  .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF  .\" SUCH DAMAGE.  .\" -.Dd January 25, 2016 +.Dd October 24, 2025  .Dt REVOKE 2  .Os  .Sh NAME @@ -62,7 +62,7 @@ using a special close method which does not block.  Access to a file may be revoked only by its owner or the super user.  The  .Fn revoke -system call is currently supported only for block and character special +system call is currently supported only for character special  device files.  It is normally used to prepare a terminal device for a new login session,  preventing any access by a previous user of the terminal. diff --git a/lib/libsys/syscalls.map b/lib/libsys/syscalls.map index b5400b9849b3..d00c862eb462 100644 --- a/lib/libsys/syscalls.map +++ b/lib/libsys/syscalls.map @@ -817,4 +817,6 @@ FBSDprivate_1.0 {  	__sys_jail_attach_jd;  	_jail_remove_jd;  	__sys_jail_remove_jd; +	_kexec_load; +	__sys_kexec_load;  }; diff --git a/lib/libsys/write.2 b/lib/libsys/write.2 index d2ff41ceead9..77067893ab4c 100644 --- a/lib/libsys/write.2 +++ b/lib/libsys/write.2 @@ -132,6 +132,26 @@ and  may write fewer bytes than requested;  the return value must be noted,  and the remainder of the operation should be retried when possible. +.Sh ATOMICITY OF WRITES +When operating on regular files on local file systems, the effects of +.Fn write +are atomic. +As required by the POSIX standard, +the +.Fn read , +.Fn write , +and +.Fn ftruncate +functions and their variations are atomic with respect to +each other on the file data and metadata for regular files. +See for instance +.St -p1003.1-2024 +Volume 2, Section 2.9.7 for more information. +.Pp +.Fx +implements the requirement by taking +a read/write range lock on the file byte range +affected by the corresponding function.  .Sh RETURN VALUES  Upon successful completion the number of bytes which were written  is returned. | 
