1178479Sjb/* 2178479Sjb * CDDL HEADER START 3178479Sjb * 4178479Sjb * The contents of this file are subject to the terms of the 5178479Sjb * Common Development and Distribution License, Version 1.0 only 6178479Sjb * (the "License"). You may not use this file except in compliance 7178479Sjb * with the License. 8178479Sjb * 9178479Sjb * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10178479Sjb * or http://www.opensolaris.org/os/licensing. 11178479Sjb * See the License for the specific language governing permissions 12178479Sjb * and limitations under the License. 13178479Sjb * 14178479Sjb * When distributing Covered Code, include this CDDL HEADER in each 15178479Sjb * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16178479Sjb * If applicable, add the following below this CDDL HEADER, with the 17178479Sjb * fields enclosed by brackets "[]" replaced with your own identifying 18178479Sjb * information: Portions Copyright [yyyy] [name of copyright owner] 19178479Sjb * 20178479Sjb * CDDL HEADER END 21178479Sjb */ 22256002Spfg 23178479Sjb/* 24178479Sjb * Copyright 2003 Sun Microsystems, Inc. All rights reserved. 25178479Sjb * Use is subject to license terms. 26178479Sjb */ 27178479Sjb 28256002Spfg/* 29256002Spfg * Copyright (c) 2012 by Delphix. All rights reserved. 30256002Spfg */ 31256002Spfg 32178479Sjb#ifndef _DT_REGSET_H 33178479Sjb#define _DT_REGSET_H 34178479Sjb 35178479Sjb#include <sys/types.h> 36178479Sjb 37178479Sjb#ifdef __cplusplus 38178479Sjbextern "C" { 39178479Sjb#endif 40178479Sjb 41178479Sjbtypedef struct dt_regset { 42178479Sjb ulong_t dr_size; /* number of registers in set */ 43178479Sjb ulong_t *dr_bitmap; /* bitmap of active registers */ 44178479Sjb} dt_regset_t; 45178479Sjb 46178479Sjbextern dt_regset_t *dt_regset_create(ulong_t); 47178479Sjbextern void dt_regset_destroy(dt_regset_t *); 48178479Sjbextern void dt_regset_reset(dt_regset_t *); 49178479Sjbextern int dt_regset_alloc(dt_regset_t *); 50178479Sjbextern void dt_regset_free(dt_regset_t *, int); 51256002Spfgextern void dt_regset_assert_free(dt_regset_t *); 52178479Sjb 53178479Sjb#ifdef __cplusplus 54178479Sjb} 55178479Sjb#endif 56178479Sjb 57178479Sjb#endif /* _DT_REGSET_H */ 58