/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_POOL_H
#define _SYS_POOL_H
#ifdef __cplusplus
extern "C" {
#endif
/* pools states */
#ifdef _KERNEL
struct pool_pset;
typedef struct pool {
} pool_t;
/*
* Flags for pool_do_bind
*/
/*
* Result codes for pool_get_class()
*/
extern int pool_count; /* current number of pools */
extern int pool_state; /* pools state -- enabled/disabled */
extern void *pool_buf; /* last state snapshot */
/*
* Lookup routines
*/
extern pool_t *pool_lookup_pool_by_name(char *);
extern pool_t *pool_lookup_pool_by_pset(int);
/*
* Configuration routines
*/
extern void pool_init(void);
extern int pool_status(int);
extern int pool_create(int, int, id_t *);
extern int pool_destroy(int, int, id_t);
extern int pool_dissoc(poolid_t, int);
extern int pool_proprm(int, int, id_t, char *);
extern int pool_commit(int);
extern void pool_get_name(pool_t *, char **);
/*
* Synchronization routines
*/
extern void pool_lock(void);
extern int pool_lock_intr(void);
extern int pool_lock_held(void);
extern void pool_unlock(void);
extern void pool_barrier_enter(void);
extern void pool_barrier_exit(void);
typedef enum {
} pool_event_t;
typedef struct pool_event_cb {
void *pec_arg;
/*
* Routines used to register interest in changes in cpu pools.
*/
extern void pool_event_cb_register(pool_event_cb_t *);
extern void pool_event_cb_unregister(pool_event_cb_t *);
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_POOL_H */