/* $Id$ */
/** @file
* uint32_t handle to void simple table API
*/
/*
* Copyright (C) 2013 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#ifndef ___cr_htable_h_
#define ___cr_htable_h_
#include <cr_error.h>
#ifndef IN_RING0
#else
#endif
typedef struct CRHTABLE
{
void **paData;
typedef struct CRHTABLE_ITERATOR
{
/*private stuff, not to be used directly */
{
return iIndex+1;
}
{
return hHandle-1;
}
/* public API */
{
}
{
uint32_t i;
{
if (phHandle)
*phHandle = 0;
return NULL;
}
{
{
if (phHandle)
*phHandle = crHTableIndex2Handle(i);
}
}
crWarning("interator concurent modification!");
return NULL;
}
{
CrHTableCreate(pSrcTbl, 0);
}
/* note: can be called for the element returned with CrHTableIterNext w/o corrupting the iterator */
#endif /* #ifndef ___cr_htable_h_*/