fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER START
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The contents of this file are subject to the terms of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Common Development and Distribution License (the "License").
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You may not use this file except in compliance with the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * or http://www.opensolaris.org/os/licensing.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * When distributing Covered Code, include this CDDL HEADER in each
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * If applicable, add the following below this CDDL HEADER, with the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fields enclosed by brackets "[]" replaced with your own identifying
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * information: Portions Copyright [yyyy] [name of copyright owner]
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER END
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifndef _SD_SAFESTORE_RAM_H
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define _SD_SAFESTORE_RAM_H
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef __cplusplus
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteextern "C" {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef _KERNEL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct ss_ram_config_s {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte uint_t ss_configured; /* configured bit */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ss_voldata_impl_t *sn_volumes; /* volume directory */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte struct ss_wr_cctl *sn_wr_cctl; /* the write control blocks */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ss_centry_info_impl_t *sn_gl_centry_info; /* dirty bits */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte struct _sd_wr_queue sn_wr_queue; /* the write queue */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} ss_ram_config_t;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* internal volume directory stream struct must be same size as ss_vdir_t */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct ss_ram_vdir_s {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte intptr_t rv_type; /* stream type */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte union {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte struct {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ss_voldata_impl_t *rv_current;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ss_voldata_impl_t *rv_end;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte } rv_all;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte struct {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte intptr_t v[5];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte } rv_vol;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte struct {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte intptr_t n[5];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte } rv_node;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte } rv_u;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte} ss_ram_vdir_t;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* internal centry stream struct must be same size as ss_cdir_t */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct ss_ram_cdir_t_s {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte intptr_t rc_type; /* stream type */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte union {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte struct {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ss_wr_cctl_t *rc_current;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ss_wr_cctl_t *rc_end;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte } rc_all;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte struct {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte intptr_t v[5];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte } rc_vol;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte struct {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte intptr_t n[5];
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte } rc_node;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte } rc_u;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte}ss_ram_cdir_t;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef ss_wr_cctl_t *ss_ram_resource_t;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef ss_wr_cctl_t *ss_ram_resourcelist_t;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _KERNEL */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#ifdef __cplusplus
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte}
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _SD_SAFESTORE_RAM_H */