pgalloc.h

Go to the documentation of this file.
00001 /*
00002 ** pgalloc.h for  in /root/work/lseos-0.2.5/libsys/conven
00003 ** 
00004 ** Copyright (c)2004 Vianney Rancurel
00005 ** Login   <vianney@epita.fr>
00006 ** 
00007 ** Started on  Wed Apr 28 15:53:37 2004 Vianney Rancurel
00008 ** Last update Mon Dec  6 12:29:43 2004 Vianney Rancurel
00009 */
00010 #ifndef __CONVEN_PGALLOC_H__
00011 #define __CONVEN_PGALLOC_H__    1
00012 #include <libc.h>
00013 
00014 typedef struct                  s_pgblock
00015 {
00016 #define PGBLOCK_MAGIC   0x42aabbcc
00017   u_int32_t                     magic;
00018   struct s_pgblock              *next;
00019   int                           offset;
00020   int                           count;
00021 }                               t_pgblock;
00022 
00023 typedef struct                  s_pgset
00024 {
00025 #define PGSET_MAGIC     0x43ddeeff
00026   u_int32_t                     magic;
00027   t_pgblock                     *block;
00028   asid_t                        asid;
00029   vaddr_t                       va;
00030   int                           nb_pgs;
00031 }                               t_pgset;
00032 
00033 typedef struct                  s_pgchunk
00034 {
00035 #define PGCHUNK_MAGIC   0x44001122
00036   u_int32_t                     magic;
00037   vaddr_t                       va;
00038   paddr_t                       pa;
00039   int                           nb_pgs;
00040 } t_pgchunk;
00041 
00042 /* PROTO pgalloc.c */
00043 /* pgalloc.c */
00044 vaddr_t pgalloc2(asid_t asid, paddr_t fixed_pa, int nb_pgs, paddr_t *pa_returned);
00045 vaddr_t pgalloc(asid_t asid, int nb_pgs);
00046 int pgfree(asid_t asid, vaddr_t vpages, int nb_pgs);
00047 int ppgalloc(asid_t asid, int nb_pgs, paddr_t *pa_returned, int *nb_pgs_returned);
00048 int bigfree(t_pgset *set);
00049 t_pgset *bigalloc(asid_t asid, int nb_pgs);
00050 void bigdump(t_pgset *set);
00051 #endif

Generated on Wed May 24 23:04:16 2006 for LSE/OS by  doxygen 1.4.6