/*
    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/steal_alloc.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 __STEAL_ALLOC_H__
#define __STEAL_ALLOC_H__

#include "types.h"

/* return errors */
#define SA_OK 0
#define SA_AGAIN 1
#define SA_INVAL -1 /* invalid pointer for free */
#define SA_NOMEM -2 /* no space left */

/* lock flags */
#define SA_NONBLOCK 0x1
#define SA_STEALING 0x2

// steal_init should be declared in vm_bootup.c
//void steal_init(struct vm_pmap *vm_pmap, address_t start, int numpages);
int steal_alloc(address_t *addr, size_t size, int lockf);
int steal_free(address_t addr, size_t size, int lockf);

#define VM_MANAGER_STEAL 0x007
extern struct vm_manager steal_manager;

#endif

