mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-12 09:58:36 +00:00
Name the implementation of brk and sbrk sys_break().
The break() system call was renamed (several times) starting in v3 AT&T UNIX when C was invented and break was a language keyword. The last vestage of a need for it to be called something else (eg obreak) was removed in r225617 which consistantly prefixed all syscall implementations. Reviewed by: emaste, kib (older version) Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D15638
This commit is contained in:
parent
8d86bd564f
commit
9da5364ed9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=335177
@ -87,8 +87,7 @@
|
||||
int mode, int dev); }
|
||||
15 AUE_CHMOD NOPROTO { int chmod(char *path, int mode); }
|
||||
16 AUE_CHOWN NOPROTO { int chown(char *path, int uid, int gid); }
|
||||
17 AUE_NULL NOPROTO { caddr_t obreak(char *nsize); } break \
|
||||
obreak_args int
|
||||
17 AUE_NULL NOPROTO { caddr_t break(char *nsize); }
|
||||
18 AUE_GETFSSTAT COMPAT4 { int freebsd32_getfsstat( \
|
||||
struct statfs32 *buf, long bufsize, \
|
||||
int mode); }
|
||||
|
@ -231,7 +231,7 @@ linux_brk(struct thread *td, struct linux_brk_args *args)
|
||||
{
|
||||
struct vmspace *vm = td->td_proc->p_vmspace;
|
||||
vm_offset_t new, old;
|
||||
struct obreak_args /* {
|
||||
struct break_args /* {
|
||||
char * nsize;
|
||||
} */ tmp;
|
||||
|
||||
@ -242,7 +242,7 @@ linux_brk(struct thread *td, struct linux_brk_args *args)
|
||||
old = (vm_offset_t)vm->vm_daddr + ctob(vm->vm_dsize);
|
||||
new = (vm_offset_t)args->dsend;
|
||||
tmp.nsize = (char *)new;
|
||||
if (((caddr_t)new > vm->vm_daddr) && !sys_obreak(td, &tmp))
|
||||
if (((caddr_t)new > vm->vm_daddr) && !sys_break(td, &tmp))
|
||||
td->td_retval[0] = (long)new;
|
||||
else
|
||||
td->td_retval[0] = (long)old;
|
||||
|
@ -57,7 +57,7 @@
|
||||
15 AUE_CHMOD STD { int ibcs2_chmod(char *path, int mode); }
|
||||
16 AUE_CHOWN STD { int ibcs2_chown(char *path, int uid, \
|
||||
int gid); }
|
||||
17 AUE_NULL NOPROTO { int obreak(caddr_t nsize); }
|
||||
17 AUE_NULL NOPROTO { caddr_t break(caddr_t nsize); }
|
||||
18 AUE_STAT STD { int ibcs2_stat(char* path, \
|
||||
struct ibcs2_stat *st); }
|
||||
19 AUE_LSEEK STD { long ibcs2_lseek(int fd, long offset, \
|
||||
|
@ -438,7 +438,7 @@ oaio_write
|
||||
##
|
||||
## Allow simple VM operations on the current process.
|
||||
##
|
||||
obreak
|
||||
break
|
||||
|
||||
##
|
||||
## Allow AIO operations by file descriptor, subject to capability rights.
|
||||
|
@ -118,8 +118,7 @@
|
||||
15 AUE_CHMOD STD { int chmod(_In_z_ char *path, int mode); }
|
||||
16 AUE_CHOWN STD { int chown(_In_z_ char *path, \
|
||||
int uid, int gid); }
|
||||
17 AUE_NULL STD { caddr_t obreak(_In_ char *nsize); } break \
|
||||
obreak_args int
|
||||
17 AUE_NULL STD { caddr_t break(_In_ char *nsize); }
|
||||
18 AUE_GETFSSTAT COMPAT4 { int getfsstat( \
|
||||
_Out_writes_bytes_opt_(bufsize) \
|
||||
struct ostatfs *buf, \
|
||||
|
@ -61,12 +61,12 @@ __FBSDID("$FreeBSD$");
|
||||
#include <vm/vm_map.h>
|
||||
|
||||
#ifndef _SYS_SYSPROTO_H_
|
||||
struct obreak_args {
|
||||
struct break_args {
|
||||
char *nsize;
|
||||
};
|
||||
#endif
|
||||
int
|
||||
sys_obreak(struct thread *td, struct obreak_args *uap)
|
||||
sys_break(struct thread *td, struct break_args *uap)
|
||||
{
|
||||
#if !defined(__aarch64__) && !defined(__riscv__)
|
||||
struct vmspace *vm = td->td_proc->p_vmspace;
|
||||
@ -196,11 +196,8 @@ sys_obreak(struct thread *td, struct obreak_args *uap)
|
||||
*
|
||||
* XXX If the pages cannot be wired, no error is returned.
|
||||
*/
|
||||
if ((map->flags & MAP_WIREFUTURE) == MAP_WIREFUTURE) {
|
||||
if (bootverbose)
|
||||
printf("obreak: MAP_WIREFUTURE set\n");
|
||||
if ((map->flags & MAP_WIREFUTURE) == MAP_WIREFUTURE)
|
||||
do_map_wirefuture = TRUE;
|
||||
}
|
||||
} else if (new < old) {
|
||||
rv = vm_map_delete(map, new, old);
|
||||
if (rv != KERN_SUCCESS) {
|
||||
|
Loading…
Reference in New Issue
Block a user