topo_builtin.h revision 74a31ce69a88d851777ca840d31ec610ce9ecab3
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi/*
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * CDDL HEADER START
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi *
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * The contents of this file are subject to the terms of the
74a31ce69a88d851777ca840d31ec610ce9ecab3timh * Common Development and Distribution License (the "License").
74a31ce69a88d851777ca840d31ec610ce9ecab3timh * You may not use this file except in compliance with the License.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi *
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * or http://www.opensolaris.org/os/licensing.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * See the License for the specific language governing permissions
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * and limitations under the License.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi *
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * When distributing Covered Code, include this CDDL HEADER in each
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * If applicable, add the following below this CDDL HEADER, with the
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * fields enclosed by brackets "[]" replaced with your own identifying
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * information: Portions Copyright [yyyy] [name of copyright owner]
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi *
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * CDDL HEADER END
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi/*
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * Use is subject to license terms.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi#ifndef _TOPO_BUILTIN_H
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi#define _TOPO_BUILTIN_H
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi#pragma ident "%Z%%M% %I% %E% SMI"
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi#ifdef __cplusplus
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiextern "C" {
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi#endif
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi#include <topo_tree.h>
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi#include <topo_module.h>
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi/*
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * topo_builtin.h
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi *
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * This header file provides prototypes for any built-in scheme enumerators
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * that are compiled directly into topo. Prototypes for their init and
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * fini routines can be added here and corresponding linkage information to
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi * these functions should be added to the table found in topo_builtin.c.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecinditypedef struct topo_builtin {
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi const char *bltin_name;
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi void (*bltin_init)(topo_mod_t *);
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi void (*bltin_fini)(topo_mod_t *);
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi} topo_builtin_t;
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiextern int topo_builtin_create(topo_hdl_t *, const char *);
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiextern void hc_init(topo_mod_t *); /* see hc.c */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiextern void hc_fini(topo_mod_t *); /* see hc.c */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiextern void cpu_init(topo_mod_t *); /* see cpu.c */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiextern void cpu_fini(topo_mod_t *); /* see cpu.c */
74a31ce69a88d851777ca840d31ec610ce9ecab3timhextern void dev_init(topo_mod_t *); /* see dev.c */
74a31ce69a88d851777ca840d31ec610ce9ecab3timhextern void dev_fini(topo_mod_t *); /* see dev.c */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiextern void mem_init(topo_mod_t *); /* see mem.c */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiextern void mem_fini(topo_mod_t *); /* see mem.c */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiextern void mod_init(topo_mod_t *); /* see mod.c */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiextern void mod_fini(topo_mod_t *); /* see mod.c */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiextern void pkg_init(topo_mod_t *); /* see pkg.c */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiextern void pkg_fini(topo_mod_t *); /* see pkg.c */
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi#ifdef __cplusplus
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi}
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi#endif
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi#endif /* _TOPO_BUILTIN_H */