/*
    Copyright 2001 (c) by Claudio Jeker,
    Swiss Federal Institute of Technology,
    Computer Engineering and Networks Laboratory.
 
    TOPSY -- A Teachable Operating System.
             Implementation of a tiny and simple
             micro kernel for teaching purposes.
 
    For further information, please visit http://www.tik.ee.ethz.ch/~topsy
 
    This software is provided under the terms of the GNU General Public 
    Licence. A full copy of the GNU GPL is provided in the file COPYING 
    found in the development root of Topsy.
*/
/*
	
    File:                  $Source: /home/ruf/cvs_Topsy/cvs/Topsy/VMemory/Attic/vm_extern.h,v $
    Affiliation:           ETH Zuerich, TIK
    Version:               $Revision: 2922 $
    Last Date of Change:   $Date: 2007-03-19 17:48:52 +0100 (Mon, 19 Mär 2007) $  by: $Author: baderma $
 
*/
#ifndef __VM_EXTERN_H__
#define __VM_EXTERN_H__

/* possible return values */

#define VM_OK		1
#define VM_FREE	2

#define VM_NIMP		 0
#define VM_FAILED	-1
#define VM_INVAL	-2
#define VM_NOMEM	-3
#define VM_ACCESS	-4
#define VM_NOBUF	-5

#define VM_OVERLAP	-30
#define VM_BADDESC	-31
#define VM_OUTOFMAP	-32

/* general stuff */

#define ONE_MEG			0x00100000

/* access permissions */

#define VM_ACCESS_NONE		0x0000 /* region is only accesable from privileged mode */
#define VM_ACCESS_EXEC		0x0001 /* region is executable */
#define VM_ACCESS_READ		0x0002 /* region is readable */
#define VM_ACCESS_WRITE		0x0004 /* region is writeable */
#define VM_ACCESS_MASK		0x0007 /* protection mask */

/*** Flags for IPC loan out ***/
#define VM_LOANOUT_KEEP		0x0001	/* if set, the sender keeps the page
after the loan out.
if it is set page is COW.
*/

#define VM_PP_INIT				0x0002	/* if set the push /pop interface will
be initilized when using page loanout
in IPC.
*/

/* debug stuff */
#define VM_SHOW_PAGES 0x1000


#endif
