~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/include/hash0hash.ic

  • Committer: Brian Aker
  • Date: 2008-10-28 08:36:02 UTC
  • mfrom: (520.4.13 merge-innodb-plugin)
  • Revision ID: brian@tangent.org-20081028083602-0p3zzlhlxr5q2sqo
Merging Monty's work

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
}
25
25
 
26
26
/*****************************************************************
 
27
Clears a hash table so that all the cells become empty. */
 
28
UNIV_INLINE
 
29
void
 
30
hash_table_clear(
 
31
/*=============*/
 
32
        hash_table_t*   table)  /* in/out: hash table */
 
33
{
 
34
        memset(table->array, 0x0,
 
35
               table->n_cells * sizeof(*table->array));
 
36
}
 
37
 
 
38
/*****************************************************************
27
39
Returns the number of cells in a hash table. */
28
40
UNIV_INLINE
29
41
ulint
58
70
        hash_table_t*   table,  /* in: hash table */
59
71
        ulint           fold)   /* in: fold */
60
72
{
 
73
        ut_ad(ut_is_2pow(table->n_mutexes));
61
74
        return(ut_2pow_remainder(fold, table->n_mutexes));
62
75
}
63
76