1*1d4b38e0Srsmaeda /* 2*1d4b38e0Srsmaeda * CDDL HEADER START 3*1d4b38e0Srsmaeda * 4*1d4b38e0Srsmaeda * The contents of this file are subject to the terms of the 5*1d4b38e0Srsmaeda * Common Development and Distribution License (the "License"). 6*1d4b38e0Srsmaeda * You may not use this file except in compliance with the License. 7*1d4b38e0Srsmaeda * 8*1d4b38e0Srsmaeda * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*1d4b38e0Srsmaeda * or http://www.opensolaris.org/os/licensing. 10*1d4b38e0Srsmaeda * See the License for the specific language governing permissions 11*1d4b38e0Srsmaeda * and limitations under the License. 12*1d4b38e0Srsmaeda * 13*1d4b38e0Srsmaeda * When distributing Covered Code, include this CDDL HEADER in each 14*1d4b38e0Srsmaeda * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*1d4b38e0Srsmaeda * If applicable, add the following below this CDDL HEADER, with the 16*1d4b38e0Srsmaeda * fields enclosed by brackets "[]" replaced with your own identifying 17*1d4b38e0Srsmaeda * information: Portions Copyright [yyyy] [name of copyright owner] 18*1d4b38e0Srsmaeda * 19*1d4b38e0Srsmaeda * CDDL HEADER END 20*1d4b38e0Srsmaeda */ 21*1d4b38e0Srsmaeda 22*1d4b38e0Srsmaeda /* 23*1d4b38e0Srsmaeda * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 24*1d4b38e0Srsmaeda * Use is subject to license terms. 25*1d4b38e0Srsmaeda */ 26*1d4b38e0Srsmaeda 27*1d4b38e0Srsmaeda #ifndef _DRD_H 28*1d4b38e0Srsmaeda #define _DRD_H 29*1d4b38e0Srsmaeda 30*1d4b38e0Srsmaeda #pragma ident "%Z%%M% %I% %E% SMI" 31*1d4b38e0Srsmaeda 32*1d4b38e0Srsmaeda #ifdef __cplusplus 33*1d4b38e0Srsmaeda extern "C" { 34*1d4b38e0Srsmaeda #endif 35*1d4b38e0Srsmaeda 36*1d4b38e0Srsmaeda #include <sys/types.h> 37*1d4b38e0Srsmaeda #include <sys/drctl.h> 38*1d4b38e0Srsmaeda 39*1d4b38e0Srsmaeda typedef int32_t cpuid_t; 40*1d4b38e0Srsmaeda 41*1d4b38e0Srsmaeda /* 42*1d4b38e0Srsmaeda * Logging support 43*1d4b38e0Srsmaeda */ 44*1d4b38e0Srsmaeda extern void drd_err(char *fmt, ...); 45*1d4b38e0Srsmaeda extern void drd_info(char *fmt, ...); 46*1d4b38e0Srsmaeda extern void drd_dbg(char *fmt, ...); 47*1d4b38e0Srsmaeda 48*1d4b38e0Srsmaeda extern boolean_t drd_daemonized; 49*1d4b38e0Srsmaeda extern boolean_t drd_debug; 50*1d4b38e0Srsmaeda 51*1d4b38e0Srsmaeda #define s_free(x) (((x) != NULL) ? (free(x), (x) = NULL) : (void *)0) 52*1d4b38e0Srsmaeda #define s_nvfree(x) (((x) != NULL) ? (nvlist_free(x)) : (void)0) 53*1d4b38e0Srsmaeda 54*1d4b38e0Srsmaeda /* 55*1d4b38e0Srsmaeda * Backend support 56*1d4b38e0Srsmaeda */ 57*1d4b38e0Srsmaeda typedef struct { 58*1d4b38e0Srsmaeda int (*init)(void); 59*1d4b38e0Srsmaeda int (*fini)(void); 60*1d4b38e0Srsmaeda int (*cpu_config_request)(drctl_rsrc_t *rsrcs, int nrsrc); 61*1d4b38e0Srsmaeda int (*cpu_config_notify)(drctl_rsrc_t *rsrcs, int nrsrc); 62*1d4b38e0Srsmaeda int (*cpu_unconfig_request)(drctl_rsrc_t *rsrcs, int nrsrc); 63*1d4b38e0Srsmaeda int (*cpu_unconfig_notify)(drctl_rsrc_t *rsrcs, int nrsrc); 64*1d4b38e0Srsmaeda } drd_backend_t; 65*1d4b38e0Srsmaeda 66*1d4b38e0Srsmaeda extern drd_backend_t drd_rcm_backend; 67*1d4b38e0Srsmaeda 68*1d4b38e0Srsmaeda #ifdef __cplusplus 69*1d4b38e0Srsmaeda } 70*1d4b38e0Srsmaeda #endif 71*1d4b38e0Srsmaeda 72*1d4b38e0Srsmaeda #endif /* _DRD_H */ 73