00001 /** \file type.h 00002 * \brief Type. 00003 * 00004 * $Id: internal.h,v 1.17 2009-08-01 10:47:31 stephens Exp $ 00005 */ 00006 #ifndef _tredmill_TYPE_H 00007 #define _tredmill_TYPE_H 00008 00009 #include "tredmill/list.h" 00010 00011 00012 /****************************************************************************/ 00013 /*! \defgroup type Type */ 00014 /*@{*/ 00015 00016 /** 00017 * A tm_type represents information about all tm_nodes of a specific size. 00018 * 00019 * -# How many tm_nodes of a given color exists. 00020 * -# Lists of tm_nodes by color. 00021 * -# Lists of tm_blocks used to parcel tm_nodes. 00022 * -# The tm_block for initializing new nodes from. 00023 * -# A tm_adesc user-level descriptor. 00024 * . 00025 */ 00026 typedef struct tm_type { 00027 /*! All types list: tm.types */ 00028 tm_list list; 00029 00030 /*! The type id: tm.type_id */ 00031 int id; 00032 00033 #if tm_name_GUARD 00034 /*! A name for debugging. */ 00035 const char *name; 00036 #endif 00037 00038 /*! Hash table next ptr: tm.type_hash[]. */ 00039 struct tm_type *hash_next; 00040 00041 /*! Size of each tm_node. */ 00042 size_t size; 00043 00044 /*! List of blocks allocated for this type. */ 00045 tm_list blocks; 00046 00047 /*! Number of nodes, indexed by tm_color: includes tm_TOTAL, tm_B, tm_NU, tm_b, tm_b_NU stats. */ 00048 size_t n[tm__LAST2]; 00049 00050 /*! Lists of node by color; see tm_node.list. */ 00051 tm_list color_list[tm_TOTAL]; 00052 00053 /*! The current block we are parceling from. */ 00054 struct tm_block *parcel_from_block; 00055 00056 /*! User-specified descriptor handle. */ 00057 struct tm_adesc *desc; 00058 } tm_type; 00059 00060 00061 /*@}*/ 00062 00063 #endif