*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->OpenBSD man pages -> hashinit (9)              
Title
Content
Arch
Section
 

HASHINIT(9)

Contents


NAME    [Toc]    [Back]

     hashinit - kernel hashtable functions

SYNOPSIS    [Toc]    [Back]

     #include <sys/systm.h>

     void *
     hashinit(int num, int type, int flags, u_long *mask);

DESCRIPTION    [Toc]    [Back]

     The hashinit() function is used to allocate a hashtable of a
desired size
     given  by  the  num  argument.  The hashinit() function will
round this number
 to the next power of two, and  allocate  and  initialize
the requested
     hashtable.   The  type and flags arguments are passed to the
malloc(9)
     function unchanged.  The mask argument is used to pass  back
the mask for
     use with the allocated hashing table.  For an example of its
use, see
     hash(9).

RETURN VALUES    [Toc]    [Back]

     The hashinit() function returns a pointer to  the  allocated
and initialized
 hash table.

SEE ALSO    [Toc]    [Back]

      
      
     free(9), hash(9), malloc(9)

LIMITATIONS    [Toc]    [Back]

     The hashinit() function currently only allocates hash tables
with LIST
     bucket pointers at this time.  Future enhancements to  allocate QUEUE
     bucket  pointers  may be warranted.  This may necessitate an
API change to
     accommodate.

HISTORY    [Toc]    [Back]

     The hashinit function first appeared in 4.4BSD.

OpenBSD     3.6                        December      8,      2001
[ Back ]
 Similar pages
Name OS Title
simple_unlock OpenBSD kernel lock functions
spinlockmgr NetBSD kernel lock functions
simple_lock_try OpenBSD kernel lock functions
signal FreeBSD kernel signal functions
lockstatus OpenBSD kernel lock functions
lockmgr_printinfo OpenBSD kernel lock functions
lockmgr OpenBSD kernel lock functions
lockinit OpenBSD kernel lock functions
lock OpenBSD kernel lock functions
copyin FreeBSD kernel copy functions
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service