Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/osf1 Implement set_program_attributes().



details:   https://anonhg.NetBSD.org/src/rev/8a88f515c2cc
branches:  trunk
changeset: 472433:8a88f515c2cc
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Apr 29 17:18:59 1999 +0000

description:
Implement set_program_attributes().

diffstat:

 sys/compat/osf1/osf1_misc.c |  27 ++++++++++++++++++++++++++-
 1 files changed, 26 insertions(+), 1 deletions(-)

diffs (41 lines):

diff -r 57c27fe42b73 -r 8a88f515c2cc sys/compat/osf1/osf1_misc.c
--- a/sys/compat/osf1/osf1_misc.c       Thu Apr 29 16:58:58 1999 +0000
+++ b/sys/compat/osf1/osf1_misc.c       Thu Apr 29 17:18:59 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: osf1_misc.c,v 1.33 1999/04/29 02:08:58 cgd Exp $ */
+/* $NetBSD: osf1_misc.c,v 1.34 1999/04/29 17:18:59 thorpej Exp $ */
 
 /*
  * Copyright (c) 1999 Christopher G. Demetriou.  All rights reserved.
@@ -1430,6 +1430,31 @@
        return (error);
 }
 
+int
+osf1_sys_set_program_attributes(p, v, retval)
+       struct proc *p;
+       void *v;
+       register_t *retval;
+{
+       struct osf1_sys_set_program_attributes_args *uap = v;
+       segsz_t tsize, dsize;
+
+       tsize = btoc(SCARG(uap, tsize));
+       dsize = btoc(SCARG(uap, dsize));
+
+       if (dsize > p->p_rlimit[RLIMIT_DATA].rlim_cur)
+               return (ENOMEM);
+       if (tsize > MAXTSIZ)
+               return (ENOMEM);
+
+       p->p_vmspace->vm_taddr = SCARG(uap, taddr);
+       p->p_vmspace->vm_tsize = tsize;
+       p->p_vmspace->vm_daddr = SCARG(uap, daddr);
+       p->p_vmspace->vm_dsize = dsize;
+
+       return (0);
+}
+
 const struct emul_flags_xtab osf1_access_flags_xtab[] = {
 #if 0 /* pseudo-flag */
     {  OSF1_F_OK,              OSF1_F_OK,              F_OK            },



Home | Main Index | Thread Index | Old Index