/***********************************************************************1* *2* This software is part of the ast package *3* Copyright (c) 1985-2011 AT&T Intellectual Property *4* and is licensed under the *5* Eclipse Public License, Version 1.0 *6* by AT&T Intellectual Property *7* *8* A copy of the License is available at *9* http://www.eclipse.org/org/documents/epl-v10.html *10* (with md5 checksum b35adb5213ca9657e911e9befb180842) *11* *12* Information and Software Systems Research *13* AT&T Research *14* Florham Park NJ *15* *16* Glenn Fowler <[email protected]> *17* David Korn <[email protected]> *18* Phong Vo <[email protected]> *19* *20***********************************************************************/21#if defined(_UWIN) && defined(_BLD_ast)2223void _STUB_vmset(){}2425#else2627#include "vmhdr.h"282930/* Set the control flags for a region.31**32** Written by Kiem-Phong Vo, [email protected], 01/16/94.33*/34#if __STD_C35int vmset(reg Vmalloc_t* vm, int flags, int on)36#else37int vmset(vm, flags, on)38reg Vmalloc_t* vm; /* region being worked on */39int flags; /* flags must be in VM_FLAGS */40int on; /* !=0 if turning on, else turning off */41#endif42{43int mode;44Vmdata_t *vd = vm->data;4546if(flags == 0 && on == 0)47return vd->mode;4849SETLOCK(vm, 0);5051mode = vd->mode;52if(on)53vd->mode |= (flags&VM_FLAGS);54else vd->mode &= ~(flags&VM_FLAGS);5556CLRLOCK(vm, 0);5758return mode;59}6061#endif626364