/* IBM_PROLOG_BEGIN_TAG                                                   */
/* This is an automatically generated prolog.                             */
/*                                                                        */
/* bos720 src/bos/kernel/alloc/ldata.h 1.7                                */
/*                                                                        */
/* Licensed Materials - Property of IBM                                   */
/*                                                                        */
/* Restricted Materials of IBM                                            */
/*                                                                        */
/* COPYRIGHT International Business Machines Corp. 2000,2007              */
/* All Rights Reserved                                                    */
/*                                                                        */
/* US Government Users Restricted Rights - Use, duplication or            */
/* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.      */
/*                                                                        */
/* IBM_PROLOG_END_TAG                                                     */

/* @(#)56  1.7  src/bos/kernel/alloc/ldata.h, sysalloc, bos720 2/9/07 16:15:01 */

#ifndef _h_LDATA
#define _h_LDATA

#ifdef _KERNEL
#include <sys/types.h>
#include <sys/skeys.h>
#include <sys/ras.h>

/* handle for an LData Pool */
typedef void * ldata_t;

/* exported ldata kernel services */
int ldata_create(size_t, long, long, kkey_t, ldata_t *);
void * ldata_alloc(ldata_t);
void ldata_free(ldata_t, void *);
int ldata_grow(ldata_t, long);
void ldata_destroy(ldata_t);

					/* 0xEEEE00009651C001 */
#define EINVAL_NO_NENTRIES		KERROR(EINVAL, sysalloc_BLOCK_04, 1)
					/* 0xEEEE00009651C002 */
#define EINVAL_BAD_HANDLE		KERROR(EINVAL, sysalloc_BLOCK_04, 2)
					/* 0xEEEE00009C51C003 */
#define ENOSPC_NENTRIES_TOO_SMALL	KERROR(ENOSPC, sysalloc_BLOCK_04, 3)


kerrno_t ldata_get_regions(ldata_t handle,
			   unsigned long *regions, long *nentries);

#ifdef _KERNSYS
void ldata_init(void);
#endif /*_KERNSYS */

#endif /* _KERNEL */
#endif /* _h_LDATA */