/*-
* See the file LICENSE for redistribution information.
*
* Copyright (c) 1996, 1997, 1998
* Sleepycat Software. All rights reserved.
*/
#include "config.h"
#ifndef lint
#endif /* not lint */
#ifndef NO_SYSTEM_INCLUDES
#include <errno.h>
#include <string.h>
#endif
#include "db_int.h"
#include "shqueue.h"
#include "db_shash.h"
#include "mp.h"
#include "common_ext.h"
/*
* memp_open --
*/
int
const char *path;
int mode;
{
/* Validate arguments. */
#ifdef HAVE_SPINLOCKS
#else
#endif
return (ret);
/* Extract fields from DB_ENV structure. */
/* Create and initialize the DB_MPOOL structure. */
return (ret);
/* Decide if it's possible for anyone else to access the pool. */
/*
* Map in the region. We do locking regardless, as portions of it are
* implemented in common code (if we put the region in a file, that is).
*/
goto err;
/*
* If there's concurrent access, then we have to lock the region.
* If it's threaded, then we have to lock both the handles and the
* region, and we need to allocate a mutex for that purpose.
*/
if (!is_private)
if (ret != 0) {
(void)memp_close(dbmp);
goto err;
}
}
return (0);
return (ret);
}
/*
* memp_close --
* Close a memory pool.
*/
int
{
ret = 0;
/* Discard DB_MPREGs. */
LIST_REMOVE(mpreg, q);
}
/* Discard DB_MPOOLFILEs. */
/* Discard thread mutex. */
}
/* Close the region. */
return (ret);
}
/*
* __memp_panic --
* Panic a memory pool.
*
* PUBLIC: void __memp_panic __P((DB_ENV *));
*/
void
{
}
/*
* memp_unlink --
* Exit a memory pool.
*/
int
const char *path;
int force;
{
int ret;
return (ret);
return (ret);
}
/*
* memp_register --
* Register a file type's pgin, pgout routines.
*/
int
int ftype;
{
int ret;
return (ret);
/*
* Insert at the head. Because we do a linear walk, we'll find
* the most recent registry in the case of multiple entries, so
* we don't have to check for multiple registries.
*/
return (0);
}