Changeset 204 for trunk/kernel/libk


Ignore:
Timestamp:
Jul 17, 2017, 8:42:59 AM (7 years ago)
Author:
alain
Message:

Bug fix in kernel_init
-This line, and those below, will be ignored--

M params.mk
M kernel_config.h
M Makefile
M hdd/virt_hdd.dmg
M tools/bootloader_tsar/boot.c
M kernel/libk/bits.h
M kernel/libk/elf.c
M kernel/libk/xhtab.c
M kernel/libk/elf.h
M kernel/libk/xhtab.h
M kernel/devices/dev_pic.c
M kernel/mm/vmm.c
M kernel/mm/mapper.c
M kernel/mm/mapper.h
M kernel/vfs/devfs.h
M kernel/vfs/vfs.c
M kernel/vfs/vfs.h
M kernel/vfs/devfs.c
M kernel/kern/chdev.h
M kernel/kern/kernel_init.c
M kernel/kern/process.c
M kernel/kern/process.h
M hal/tsar_mips32/core/hal_remote.c
M hal/tsar_mips32/drivers/soclib_pic.c

Location:
trunk/kernel/libk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/libk/bits.h

    r23 r204  
    3030
    3131/*********************************************************************************************
    32  * These macros are NOT used by the bitmat, but can be useful in other contexts... [AG]
     32 * These macros are NOT used by the bitmap, but can be useful in other contexts... [AG]
    3333 *********************************************************************************************/
    3434
  • trunk/kernel/libk/elf.c

    r157 r204  
    7575///////////////////////////////////////////////////////////////////////////////////////
    7676// This function loads the .elf header in the buffer allocated by the caller.
     77///////////////////////////////////////////////////////////////////////////////////////
    7778// @ file   : extended pointer on the remote file descriptor.
    7879// @ buffer : pointer on buffer allocated by the caller.
    7980// @ size   : number of bytes to read.
    8081///////////////////////////////////////////////////////////////////////////////////////
    81 static error_t elf_header_read( xptr_t   file_xp,
     82static error_t elf_header_load( xptr_t   file_xp,
    8283                                void   * buffer,
    8384                                uint32_t size )
     
    114115        }
    115116        return 0;
    116 }
     117
     118} // end elf_header_load()
    117119
    118120///////////////////////////////////////////////////////////////////////////////////////
    119121// This function registers in the process VMM the CODE and DATA segments.
     122///////////////////////////////////////////////////////////////////////////////////////
    120123// @ file      : extended pointer on the remote file descriptor.
    121124// @ segs_base : local pointer on buffer containing the segments descriptors array
     
    212215
    213216        return 0;
    214 }
     217
     218} // end elf_segments_load()
    215219
    216220///////////////////////////////////////////////
     
    218222                          process_t * process)
    219223{
    220         char         path_copy[CONFIG_VFS_MAX_PATH_LENGTH];
    221224        kmem_req_t   req;              // kmem request for program header
    222         uint32_t     length;           // actual path length
    223225        Elf32_Ehdr   header;           // local buffer for .elf header
    224226        void       * segs_base;        // pointer on buffer for segment descriptors array
     
    229231        error_t      error;
    230232
    231         // get path length from user space
    232         length = hal_strlen_from_uspace( pathname );
    233 
    234         if( length >= CONFIG_VFS_MAX_PATH_LENGTH )
    235         {
    236                 printk("\n[ERROR] in %s : pathname length too long\n", __FUNCTION__ );
    237                 return -1;
    238         }
    239 
    240         // make a local copy for pathname
    241         hal_copy_from_uspace( path_copy , pathname , length+1 );
     233    elf_dmsg("\n[INFO] %s : enter for %s\n", __FUNCTION__ , pathname );
     234
     235    // avoid GCC warning
     236        file_xp = XPTR_NULL; 
     237        file_id = -1;
    242238
    243239        // open file
    244         file_xp = XPTR_NULL;  // avoid GCC warning
    245         file_id = -1;
    246 
    247240        error = vfs_open( process->vfs_cwd_xp,
    248                           path_copy,
     241                          pathname,
    249242                          O_RDONLY,
    250243                          0,
     
    253246        if( error )
    254247        {
    255                 printk("\n[ERROR] in %s : failed to open executable file %s\n",
    256                        __FUNCTION__ , path_copy );
    257                 return -1;
    258         }
     248                printk("\n[ERROR] in %s : failed to open file %s\n", __FUNCTION__ , pathname );
     249                return -1;
     250        }
     251
     252    elf_dmsg("\n[INFO] %s : file %s open\n", __FUNCTION__ , pathname );
    259253
    260254        // load header in local buffer
    261         error = elf_header_read( file_xp ,
     255        error = elf_header_load( file_xp ,
    262256                                 &header,
    263257                                 sizeof(Elf32_Ehdr) );
    264258        if( error )
    265259        {
    266                 vfs_close( file_xp , file_id );
    267                 return -1;
    268         }
    269 
    270         elf_dmsg("\n[INFO] %s loaded elf header for %s\n", __FUNCTION__ , path_copy );
     260                printk("\n[ERROR] in %s : cannot get header file %s\n", __FUNCTION__ , pathname );
     261                vfs_close( file_xp , file_id );
     262                return -1;
     263        }
     264
     265        elf_dmsg("\n[INFO] %s : loaded elf header for %s\n", __FUNCTION__ , pathname );
    271266
    272267        if( header.e_phnum == 0 )
     
    320315        }
    321316
    322         elf_dmsg("\n[INFO] %s loaded segments descriptors for %s \n", __FUNCTION__ , path_copy );
     317        elf_dmsg("\n[INFO] %s loaded segments descriptors for %s \n", __FUNCTION__ , pathname );
    323318
    324319        // register loadable segments in process VMM
     
    346341
    347342        elf_dmsg("\n[INFO] %s successfully completed / entry point = %x for %s]\n",
    348                  __FUNCTION__, (uint32_t) header.e_entry , path_copy );
     343                 __FUNCTION__, (uint32_t) header.e_entry , pathname );
    349344
    350345        return 0;
    351 }
    352 
     346
     347}  // end elf_load_process()
     348
  • trunk/kernel/libk/elf.h

    r158 r204  
    182182 * It also registers the process entry point in VMM.
    183183 ****************************************************************************************
    184  * @ pathname : .elf file pathname (in user space => must use hal_uspace API).
     184 * @ pathname : local pointer on .elf file pathname (in kernel space).
    185185 * @ process  : local pointer on target process descriptor.
    186186 ***************************************************************************************/
  • trunk/kernel/libk/xhtab.c

    r188 r204  
    7676// returns true if given name matches directory entry name.
    7777////////////////////////////////////////////////////////////////////////////////////////////
    78 static bool_t xhtab_dentry_item_match_key( xptr_t item_xp,
     78static bool_t xhtab_dentry_item_match_key( xptr_t    item_xp,
    7979                                           void    * key )
    8080{
    81     vfs_dentry_t * dentry_ptr;
    82     cxy_t          dentry_cxy;
    83 
    84     char           name[CONFIG_VFS_MAX_NAME_LENGTH];
     81    char name[CONFIG_VFS_MAX_NAME_LENGTH];
    8582
    8683    // get dentry cluster and local pointer
    87     dentry_cxy = GET_CXY( item_xp );
    88     dentry_ptr = (vfs_dentry_t *)GET_PTR( item_xp );
     84    cxy_t          dentry_cxy = GET_CXY( item_xp );
     85    vfs_dentry_t * dentry_ptr = (vfs_dentry_t *)GET_PTR( item_xp );
    8986
    9087    // make a local copy of directory entry name
     
    9491    return( strcmp( name , (char*)key ) == 0 );
    9592}
    96                        
     93
     94////////////////////////////////////////////////////////////////////////////////////////////
     95// This function print the item key, that is the name for a vfs_entry_t,
     96////////////////////////////////////////////////////////////////////////////////////////////
     97// @ item_xp   : extended pointer on item.
     98////////////////////////////////////////////////////////////////////////////////////////////
     99static void xhtab_dentry_item_print_key( xptr_t item_xp )
     100{
     101    char name[CONFIG_VFS_MAX_NAME_LENGTH];
     102
     103    // get dentry cluster and local pointer
     104    cxy_t          dentry_cxy = GET_CXY( item_xp );
     105    vfs_dentry_t * dentry_ptr = (vfs_dentry_t *)GET_PTR( item_xp );
     106   
     107    // make a local copy of directory entry name
     108    hal_remote_strcpy( XPTR( local_cxy , name ) ,
     109                       XPTR( dentry_cxy , &dentry_ptr->name ) );
     110
     111    // print dentry name
     112    printk("%s , ", name );
     113}                       
     114
    97115////////////////////////////////////////////////////////////////////////////////////////
    98116//         Generic access functions
     
    108126    remote_rwlock_init( XPTR( local_cxy , &xhtab->lock) );
    109127
    110     xhtab->items  = 0;
     128    xhtab->items            = 0;
     129    xhtab->current_index    = 0;
     130    xhtab->current_xlist_xp = XPTR_NULL;
    111131
    112132    if( type == XHTAB_DENTRY_TYPE )
     
    115135        xhtab->index_from_key  = &xhtab_dentry_index_from_key;
    116136        xhtab->item_from_xlist = &xhtab_dentry_item_from_xlist;
     137        xhtab->item_print_key  = &xhtab_dentry_item_print_key;
    117138    }
    118139    else
     
    134155                   void    * key )
    135156{
    136     xptr_t    xlist_xp;                                 // xlist_entry_t (iterator)
    137     xptr_t    item_xp;                                  // associated item
    138     xhtab_t * xhtab_ptr;                                // hash table local pointer
    139     cxy_t     xhtab_cxy;                                // hash table cluster
     157    xptr_t              xlist_xp;           // xlist_entry_t (iterator)
     158    xptr_t              item_xp;            // associated item
     159    xhtab_t           * xhtab_ptr;          // hash table local pointer
     160    cxy_t               xhtab_cxy;          // hash table cluster
     161    item_from_xlist_t * item_from_xlist;    // function pointer
     162    item_match_key_t  * item_match_key;     // function pointer
    140163
    141164    // get hash table cluster and local pointer
    142165    xhtab_cxy = GET_CXY( xhtab_xp );
    143166    xhtab_ptr = (xhtab_t *)GET_PTR( xhtab_xp );
     167
     168    // get pointer on "item_from_xlist" function
     169    item_from_xlist = (item_from_xlist_t *)hal_remote_lpt( XPTR( xhtab_cxy ,
     170                                                           &xhtab_ptr->item_from_xlist ) );
     171    // get pointer on "item_match_key" function
     172    item_match_key = (item_match_key_t *)hal_remote_lpt( XPTR( xhtab_cxy ,
     173                                                         &xhtab_ptr->item_match_key ) );
    144174
    145175    // scan sub-list[index]
     
    147177    {
    148178        // get extended pointer on item containing the xlist entry
    149             item_xp = xhtab_ptr->item_from_xlist( xlist_xp );
     179            item_xp = item_from_xlist( xlist_xp );
    150180
    151181        // check matching
    152         if( xhtab_ptr->item_match_key( item_xp , key ) ) return item_xp;
     182        if( item_match_key( item_xp , key ) ) return item_xp;
    153183    }
    154184
    155185    // No matching item found
    156186    return XPTR_NULL;
    157 }
     187
     188}  // end xhtab_scan()
    158189
    159190///////////////////////////////////////
     
    162193                      xptr_t   xlist_xp )
    163194{
    164     // get xhtab cluster and local pointer
    165     cxy_t     xhtab_cxy = GET_CXY( xhtab_xp );
    166     xhtab_t * xhtab_ptr = (xhtab_t *)GET_PTR( xhtab_xp );
    167 
     195    xptr_t             item_xp;
     196    uint32_t           index;
     197    cxy_t              xhtab_cxy;
     198    xhtab_t          * xhtab_ptr;
     199    index_from_key_t * index_from_key;     // function pointer
     200   
     201    // get xhtab cluster and local pointer
     202    xhtab_cxy = GET_CXY( xhtab_xp );
     203    xhtab_ptr = (xhtab_t *)GET_PTR( xhtab_xp );
     204
     205    // get pointer on "index_from_key" function
     206    index_from_key = (index_from_key_t *)hal_remote_lpt( XPTR( xhtab_cxy ,
     207                                                         &xhtab_ptr->index_from_key ) );
    168208    // compute index from key
    169         uint32_t index = xhtab_ptr->index_from_key( key );
     209        index = index_from_key( key );
    170210
    171211    // take the lock protecting hash table
     
    173213
    174214    // search a matching item
    175     xptr_t item_xp = xhtab_scan( xhtab_xp , index , key );
     215    item_xp = xhtab_scan( xhtab_xp , index , key );
    176216
    177217    if( item_xp != XPTR_NULL )    // error if found
     
    202242                      xptr_t   xlist_entry_xp )
    203243{
    204     // get xhtab cluster and local pointer
    205     cxy_t     xhtab_cxy = GET_CXY( xhtab_xp );
    206     xhtab_t * xhtab_ptr = (xhtab_t *)GET_PTR( xhtab_xp );
    207 
     244    xptr_t             item_xp;
     245    uint32_t           index;
     246    cxy_t              xhtab_cxy;
     247    xhtab_t          * xhtab_ptr;
     248    index_from_key_t * index_from_key;     // function pointer
     249
     250    // get xhtab cluster and local pointer
     251    xhtab_cxy = GET_CXY( xhtab_xp );
     252    xhtab_ptr = (xhtab_t *)GET_PTR( xhtab_xp );
     253
     254    // get pointer on "index_from_key" function
     255    index_from_key = (index_from_key_t *)hal_remote_lpt( XPTR( xhtab_cxy ,
     256                                                         &xhtab_ptr->index_from_key ) );
    208257    // compute index from key
    209         uint32_t index = xhtab_ptr->index_from_key( key );
     258        index = index_from_key( key );
    210259
    211260    // take the lock protecting hash table
     
    213262
    214263    // get extended pointer on item to remove
    215     xptr_t item_xp = xhtab_scan( xhtab_xp , index , key );
     264    item_xp = xhtab_scan( xhtab_xp , index , key );
    216265
    217266    if( item_xp == XPTR_NULL )    // error if not found
     
    241290                      void    * key )
    242291{
    243     xptr_t  item_xp;
    244 
    245     // get xhtab cluster and local pointer
    246     cxy_t     xhtab_cxy = GET_CXY( xhtab_xp );
    247     xhtab_t * xhtab_ptr = (xhtab_t *)GET_PTR( xhtab_xp );
    248 
     292    xptr_t             item_xp;
     293    uint32_t           index;
     294    cxy_t              xhtab_cxy;
     295    xhtab_t          * xhtab_ptr;
     296    index_from_key_t * index_from_key;     // function pointer
     297
     298    // get xhtab cluster and local pointer
     299    xhtab_cxy = GET_CXY( xhtab_xp );
     300    xhtab_ptr = (xhtab_t *)GET_PTR( xhtab_xp );
     301
     302    // get pointer on "index_from_key" function
     303    index_from_key = (index_from_key_t *)hal_remote_lpt( XPTR( xhtab_cxy ,
     304                                                         &xhtab_ptr->index_from_key ) );
    249305    // compute index from key
    250         uint32_t index = xhtab_ptr->index_from_key( key );
     306        index = index_from_key( key );
    251307
    252308    // take the lock protecting hash table
     
    288344xptr_t xhtab_get_first( xptr_t xhtab_xp )
    289345{
    290     uint32_t index;
    291     xptr_t   xlist_xp;
    292     xptr_t   item_xp;
    293     xptr_t   root_xp;
    294 
    295     // get xhtab cluster and local pointer
    296     cxy_t     xhtab_cxy = GET_CXY( xhtab_xp );
    297     xhtab_t * xhtab_ptr = (xhtab_t *)GET_PTR( xhtab_xp );
    298 
     346    uint32_t            index;
     347    cxy_t               xhtab_cxy;
     348    xhtab_t           * xhtab_ptr;
     349    xptr_t              xlist_xp;
     350    xptr_t              item_xp;
     351    xptr_t              root_xp;
     352    item_from_xlist_t * item_from_xlist;   // function pointer
     353
     354    // get xhtab cluster and local pointer
     355    xhtab_cxy = GET_CXY( xhtab_xp );
     356    xhtab_ptr = (xhtab_t *)GET_PTR( xhtab_xp );
     357
     358    // get pointer on "item_from_xlist" function
     359    item_from_xlist = (item_from_xlist_t *)hal_remote_lpt( XPTR( xhtab_cxy ,
     360                                                           &xhtab_ptr->item_from_xlist ) );
    299361    //loop on subsets
    300362    for( index = 0 ; index < XHASHTAB_SIZE ; index++ )
     
    309371        {
    310372            // get extended pointer on item containing the xlist entry
    311                 item_xp = xhtab_ptr->item_from_xlist( xlist_xp );
     373                item_xp = item_from_xlist( xlist_xp );
    312374
    313375            // register item in hash table header
     
    327389xptr_t xhtab_get_next( xptr_t xhtab_xp )
    328390{
    329     uint32_t index;
    330     xptr_t   xlist_xp;
    331     xptr_t   item_xp;
    332     xptr_t   root_xp;
     391    uint32_t            index;
     392    cxy_t               xhtab_cxy;
     393    xhtab_t           * xhtab_ptr;
     394    xptr_t              xlist_xp;
     395    xptr_t              item_xp;
     396    xptr_t              root_xp;
     397    item_from_xlist_t * item_from_xlist;   // function pointer
    333398
    334399    uint32_t current_index;
     
    336401
    337402    // get xhtab cluster and local pointer
    338     cxy_t     xhtab_cxy = GET_CXY( xhtab_xp );
    339     xhtab_t * xhtab_ptr = (xhtab_t *)GET_PTR( xhtab_xp );
     403    xhtab_cxy = GET_CXY( xhtab_xp );
     404    xhtab_ptr = (xhtab_t *)GET_PTR( xhtab_xp );
    340405
    341406    // get current item pointers
     
    343408    current_xlist_xp = hal_remote_lwd( XPTR( xhtab_cxy , &xhtab_ptr->current_xlist_xp ) );
    344409
     410    // get pointer on "item_from_xlist" function
     411    item_from_xlist = (item_from_xlist_t *)hal_remote_lpt( XPTR( xhtab_cxy ,
     412                                                           &xhtab_ptr->item_from_xlist ) );
    345413    //loop on subsets
    346414    for( index = current_index ; index < XHASHTAB_SIZE ; index++ )
     
    350418
    351419        // get next item
    352         xlist_xp = xlist_next( root_xp , current_xlist_xp );
     420        if( index == current_index ) xlist_xp = xlist_next( root_xp , current_xlist_xp );
     421        else                         xlist_xp = xlist_next( root_xp , root_xp );
    353422
    354423        if( xlist_xp != XPTR_NULL )  // next item found
    355424        {
    356425            // get extended pointer on item containing the xlist entry
    357                 item_xp = xhtab_ptr->item_from_xlist( xlist_xp );
     426                item_xp = item_from_xlist( xlist_xp );
    358427
    359428            // register item in hash table header
     
    370439} // end xhtab_get_next()
    371440
    372 
     441/////////////////////////////////////
     442void xhtab_display( xptr_t xhtab_xp )
     443{
     444    uint32_t            index;
     445    cxy_t               xhtab_cxy;
     446    xhtab_t           * xhtab_ptr;
     447    xptr_t              root_xp;
     448    xptr_t              iter_xp;
     449    xptr_t              item_xp;
     450    item_from_xlist_t * item_from_xlist;   // function pointer
     451    item_print_key_t  * item_print_key;    // function pointer
     452
     453    // get xhtab cluster and local pointer
     454    xhtab_cxy = GET_CXY( xhtab_xp );
     455    xhtab_ptr = (xhtab_t *)GET_PTR( xhtab_xp );
     456
     457    // get pointer on "item_from_xlist" function
     458    item_from_xlist = (item_from_xlist_t *)hal_remote_lpt( XPTR( xhtab_cxy ,
     459                                                           &xhtab_ptr->item_from_xlist ) );
     460    // get pointer on "item_print_key" function
     461    item_print_key = (item_print_key_t *)hal_remote_lpt( XPTR( xhtab_cxy ,
     462                                                         &xhtab_ptr->item_print_key ) );
     463    //loop on subsets
     464    for( index = 0 ; index < XHASHTAB_SIZE ; index++ )
     465    {
     466        printk(" index = %d : ", index );
     467
     468        // get root of subset
     469        root_xp = XPTR( xhtab_cxy , &xhtab_ptr->roots[index] );
     470
     471        // loop on xlist
     472        XLIST_FOREACH( root_xp , iter_xp )
     473        {
     474            // get item from xlist
     475            item_xp = item_from_xlist( iter_xp );
     476           
     477            // print item identifier
     478            item_print_key( item_xp );
     479        }
     480
     481        printk("\n");
     482    }
     483}  // end xhtab_display()
  • trunk/kernel/libk/xhtab.h

    r188 r204  
    3636// It can be accessed by any thread, running in any cluster.
    3737// It is generic as it can be used to register various types of items.
    38 // The main goal is to speedup search by key for a large number of items of same type.
     38// The main goal is to speedup search by key in a large number of items of same type.
    3939// For this purpose the set of all registered items is split in several subsets.
    4040// Each subset is organised as an embedded double linked lists.
    4141// - an item is uniquely identified by a <key>, that is a single uint32_t value.
    42 // - From the <key> value,the hash table uses an item type specific xhtab_index() function,
    43 //   to compute an <index> value, defining a subset of registered items.
     42// - From the <key> value, the hash table uses an item type specific xhtab_index()
     43//   function, to compute an <index> value, defining a subset of registered items.
    4444// - to discriminate between items that have the same <index>, the hash table makes
    45 //   an associative search in subset.
     45//   an associative search on the key in subset.
    4646// - Each registered item is a structure, that must contain an embedded xlist_entry,
    4747//   that is part of the xlist implementing the subset.
    4848//
    49 // A total order is defined for all registered items by the increasing index values,
    50 // and for each index value by the position in the partial xlist.
     49// For all registered items, a total order is defined by the increasing index values,
     50// and for each index value, by the position in the partial xlist.
    5151// This order is used by the two functions xhtab_get_first() and xhtab_get_next(), that
    5252// are used to scan all registered items. The two "current_index" and "current_xlist_xp"
     
    5454//
    5555// Implementation Note:
    56 // For each supported item type ***, you must define the three item-type-specific
     56// For each supported item type ***, you must define four item-type-specific
    5757// functions specified below, and you must update the xhtab_init() function
    5858// and the xhtab_item_type_t.
    5959///////////////////////////////////////////////////////////////////////////////////////////
    6060
    61 #define XHASHTAB_SIZE    64   // number of subsets
     61#define XHASHTAB_SIZE    8   // number of subsets
    6262
    6363/******************************************************************************************
    64  * This define the three item type specific function prototypes.
     64 * This define the four item_type_specific function prototypes that must be defined
     65 * for each item type.
    6566 *****************************************************************************************/
    6667
    67 typedef  bool_t    xhtab_match_t ( xptr_t item_xp , void * key );
    68 typedef  xptr_t    xhtab_item_t  ( xptr_t xlist_xp );
    69 typedef  uint32_t  xhtab_index_t ( void * key );
     68typedef  bool_t    (item_match_key_t)   ( xptr_t item_xp , void * key );
     69typedef  xptr_t    (item_from_xlist_t)  ( xptr_t xlist_xp );
     70typedef  uint32_t  (index_from_key_t)   ( void * key );
     71typedef  void      (item_print_key_t)   ( xptr_t item_xp );
    7072
    7173/******************************************************************************************
     
    8587typedef struct xhtab_s
    8688{
    87         xlist_entry_t      roots[XHASHTAB_SIZE];  /*! array of roots of xlist                */
    88     xhtab_index_t    * index_from_key;        /*! item specific function                 */
    89     xhtab_match_t    * item_match_key;        /*! item specific function                 */
    90     xhtab_item_t     * item_from_xlist;       /*! item specific function                 */
    91     uint32_t           items;                 /*! number of registered items             */
    92     remote_rwlock_t    lock;                  /*! lock protecting hash table accesses    */
    93     uint32_t           current_index;         /*! current item subset index              */
    94     xptr_t           * current_xlist_xp;      /*! xptr on current item xlist entry       */
     89        xlist_entry_t       roots[XHASHTAB_SIZE];  /*! array of roots of xlist               */
     90    index_from_key_t  * index_from_key;        /*! item specific function pointer        */
     91    item_match_key_t  * item_match_key;        /*! item specific function pointer        */
     92    item_from_xlist_t * item_from_xlist;       /*! item specific function pointer        */
     93    item_print_key_t  * item_print_key;        /*! item specific function pointer        */
     94    uint32_t            items;                 /*! number of registered items            */
     95    remote_rwlock_t     lock;                  /*! lock protecting hash table accesses   */
     96    uint32_t            current_index;         /*! current item subset index             */
     97    xptr_t              current_xlist_xp;      /*! xptr on current item xlist entry      */
    9598}
    9699xhtab_t;
     
    100103 * The initialisation must be done by a thread running in cluster containing the table.
    101104 ******************************************************************************************
    102  * @ xhtab   : local pointer on local xhtab to be initialized.
    103  * @ type    : item type (see above).
     105 * @ xhtab    : local pointer on local xhtab to be initialized.
     106 * @ type     : item type (see above).
    104107 *****************************************************************************************/
    105108void xhtab_init( xhtab_t           * xhtab,
     
    176179xptr_t xhtab_get_next( xptr_t xhtab_xp );
    177180
    178 
     181/******************************************************************************************
     182 * This function displays the full content of an xhtab.
     183 ******************************************************************************************
     184 * @ xhtab_xp  : extended pointer on hash table.
     185 *****************************************************************************************/
     186void xhtab_display( xptr_t  xhtab_xp );
    179187
    180188#endif  /* _XHTAB_H_ */
Note: See TracChangeset for help on using the changeset viewer.