reg_alloc.h

00001 
00002 /*---------------------------------------------------------------------------
00003                                     E.S.O.
00004  ----------------------------------------------------------------------------
00005    File name    :   reg_alloc.h
00006    Author       :   N. Devillard
00007    Created on   :   February 2000
00008    Language     :   ANSI C
00009    Description  :   cube allocation tracking routines
00010  *--------------------------------------------------------------------------*/
00011 
00012 /*
00013 
00014     $Id: reg_alloc.h,v 1.1 2003/09/03 12:50:47 amodigli Exp $
00015     $Author: amodigli $
00016     $Date: 2003/09/03 12:50:47 $
00017     $Revision: 1.1 $
00018 
00019 */
00020 
00021 #ifndef _CUBE_ALLOC_H_
00022 #define _CUBE_ALLOC_H_
00023 
00024 /*---------------------------------------------------------------------------
00025                                 Includes
00026  ---------------------------------------------------------------------------*/
00027 
00028 #include <stdio.h>
00029 #include <stdlib.h>
00030 #include "mmap_i.h"
00031 
00032 
00033 /*---------------------------------------------------------------------------
00034                                 New types
00035  ---------------------------------------------------------------------------*/
00036 
00037 typedef struct _REG_ALLOC_ENTRY_ {
00038     int             active ;
00039     void        *   file_ref ;
00040     void        *   image_ref ;
00041     mmap_file   *   mm ;
00042 } reg_alloc_entry ;
00043 
00044 
00045 /*---------------------------------------------------------------------------
00046                         Function ANSI prototypes
00047  ---------------------------------------------------------------------------*/
00048 
00049 
00050 /*---------------------------------------------------------------------------
00051    Function :   reg_alloc_add()
00052    In       :   pointer to allocated reg_alloc_entry
00053    Out      :   void
00054    Job      :   add an entry to the reg_alloc table
00055    Notice   :   if the given file entry does not exist, a new file
00056                 entry is inserted in the table (at the end). In this
00057                 new file entry, a new image entry is inserted.
00058                 If the file entry already exists, the image entry is
00059                 appended to the list of already existing image
00060                 entries.
00061  ---------------------------------------------------------------------------*/
00062 
00063 
00064 void reg_alloc_add(reg_alloc_entry * r);
00065 
00066 
00067 /*---------------------------------------------------------------------------
00068    Function :   reg_alloc_remove()
00069    In       :   pointer to allocated reg_alloc_entry
00070    Out      :   number of counts remaining in the associated file entry.
00071    Job      :   remove an image entry from the table. If the number of
00072                 counts associated to the corresponding file entry goes
00073                 to zero, the file entry is removed also.
00074    Notice   :
00075  ---------------------------------------------------------------------------*/
00076 
00077 
00078 int reg_alloc_remove(reg_alloc_entry * r);
00079 
00080 
00081 /*---------------------------------------------------------------------------
00082    Function :   reg_alloc_status()
00083    In       :   void
00084    Out      :   void
00085    Job      :   shows a status of the current reg_alloc table if non-empty
00086    Notice   :   does nothing if the table is empty
00087  ---------------------------------------------------------------------------*/
00088 
00089 
00090 void reg_alloc_status(void);
00091 
00092 #endif

Generated on Wed Oct 26 13:08:54 2005 for SINFONI Pipeline Reference Manual by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001