10eb822a1Scindi /* 20eb822a1Scindi * CDDL HEADER START 30eb822a1Scindi * 40eb822a1Scindi * The contents of this file are subject to the terms of the 50eb822a1Scindi * Common Development and Distribution License (the "License"). 60eb822a1Scindi * You may not use this file except in compliance with the License. 70eb822a1Scindi * 80eb822a1Scindi * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90eb822a1Scindi * or http://www.opensolaris.org/os/licensing. 100eb822a1Scindi * See the License for the specific language governing permissions 110eb822a1Scindi * and limitations under the License. 120eb822a1Scindi * 130eb822a1Scindi * When distributing Covered Code, include this CDDL HEADER in each 140eb822a1Scindi * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150eb822a1Scindi * If applicable, add the following below this CDDL HEADER, with the 160eb822a1Scindi * fields enclosed by brackets "[]" replaced with your own identifying 170eb822a1Scindi * information: Portions Copyright [yyyy] [name of copyright owner] 180eb822a1Scindi * 190eb822a1Scindi * CDDL HEADER END 200eb822a1Scindi */ 210eb822a1Scindi /* 22*8393544eSHyon Kim * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 230eb822a1Scindi */ 240eb822a1Scindi 250eb822a1Scindi #ifndef _FMD_TOPO_H 260eb822a1Scindi #define _FMD_TOPO_H 270eb822a1Scindi 280eb822a1Scindi #ifdef __cplusplus 290eb822a1Scindi extern "C" { 300eb822a1Scindi #endif 310eb822a1Scindi 320eb822a1Scindi #include <fm/libtopo.h> 330eb822a1Scindi 340eb822a1Scindi #include <fmd_list.h> 350eb822a1Scindi 360eb822a1Scindi extern void fmd_topo_init(void); 370eb822a1Scindi extern void fmd_topo_fini(void); 380eb822a1Scindi 390eb822a1Scindi typedef struct fmd_topo { 400eb822a1Scindi fmd_list_t ft_list; 410eb822a1Scindi topo_hdl_t *ft_hdl; 4224db4641Seschrock uint32_t ft_refcount; 4307312882SEric Schrock hrtime_t ft_time_begin; 4407312882SEric Schrock hrtime_t ft_time_end; 450eb822a1Scindi } fmd_topo_t; 460eb822a1Scindi 47*8393544eSHyon Kim extern void fmd_topo_update(void); 4824db4641Seschrock extern fmd_topo_t *fmd_topo_hold(void); 4924db4641Seschrock extern void fmd_topo_addref(fmd_topo_t *); 5024db4641Seschrock extern void fmd_topo_rele(fmd_topo_t *); 5124db4641Seschrock extern void fmd_topo_rele_hdl(topo_hdl_t *); 5224db4641Seschrock 530eb822a1Scindi #ifdef __cplusplus 540eb822a1Scindi } 550eb822a1Scindi #endif 560eb822a1Scindi 570eb822a1Scindi #endif /* _FMD_TOPO_H */ 58