Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../.././../../../../usr/include/vm/seg_shared_impl.h
Real path: /usr/include/vm/seg_shared_impl.h
Zurück
/* * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. */ #ifndef _VM_SEG_SHARED_IMPL_H #define _VM_SEG_SHARED_IMPL_H #include <vm/seg_shared.h> #include <sys/sysmacros.h> #include <sys/mutex.h> #include <sys/condvar.h> #include <sys/list.h> #include <vm/kmc.h> #ifdef __cplusplus extern "C" { #endif struct ss_mo; /* * Tracks info related to a single-permission inner address space for use * with hat_share(); ssi_prot is the protection for all mappings in the * inner hat ssi_hat. * * The presence of an ss_inner_t is protected by ssi_ssm->ssm_mw->mw_meta * rwlock, which must be held to make ssi_refcnt non-zero. * * ssi_refcnt is atomically updated; other than 0->1 transitions, updates * do not require locks. */ typedef struct ss_inner { struct ss_mo *ssi_ssm; struct as *ssi_as; /* consists of one segment, ssi_seg */ struct hat *ssi_hat; struct seg *ssi_seg; caddr_t ssi_addr; /* base address of inner seg */ volatile ulong_t ssi_refcnt; /* # outer HATs hat_share()ing us */ uint8_t ssi_prot; /* base protections */ mc_seg_t *ssi_mc; /* array holding per-granule MC info */ size_t ssi_mc_size; } ss_inner_t; /* * Information for a single MO related to its use for hat_share. */ typedef struct ss_mo { struct ss_mo *ssm_hash; /* hash linkage */ struct mo *ssm_mo; struct mw *ssm_mw; /* mw_meta protects all ssi_refcnts */ struct kshmid *ssm_kshmid; /* != NULL -> granule-based */ size_t ssm_size; /* maximum offset */ size_t ssm_hold; /* prevent it from going away */ segshared_register_mo_flags_t ssm_flags; /* creation-time flags */ kcondvar_t ssm_cv; /* hold -> 0 */ szc_t ssm_maxszc; /* maximum used SZC */ uint8_t ssm_has_adi; /* any ADI mappings in use? */ uint8_t ssm_granule_shift; /* lg(granule size) for kshmid */ #define SSM_PERMS 4 /* { ro, rw } x { exec, !exec } */ /* dynamic state, protected by ssm_mw->mw_meta */ ss_inner_t *ssm_shares[SSM_PERMS]; } ss_mo_t; typedef struct ss_mo_bucket { kmutex_t ssmb_lock; ss_mo_t *ssmb_chain; char ssmb_pad[P2NPHASE( sizeof (kmutex_t) + sizeof (ss_mo_t *), _FALSE_SHARING_ALIGN)]; } ss_mo_bucket_t; /* * Per-mapping seg_shared data (seg->s_data) */ typedef struct segshared { list_node_t ss_node; /* on ssm_list */ struct seg *ss_seg; struct mo *ss_mo; struct mw *ss_mw; struct ss_inner *ss_inner; /* hat_share() data, holds ssi_refcnt */ struct kshmid *ss_kshmid; size_t ss_granulesz; /* if non-zero, OSM */ uint8_t ss_prot; uint8_t ss_maxprot; uint8_t ss_ssm_state; /* ssm_list membership state */ uint8_t ss_node_hold; /* count of folks using this ss */ kcondvar_t ss_hold_cv; /* 255 -> 254, removed */ kcondvar_t ss_remove_cv; /* hold goes from 1 -> 0 */ } segshared_t; typedef enum ss_ssm_state { SSM_NOT_LISTED = 0, /* Not on ssm_list */ SSM_ITERATOR, /* On ssm_list, is iterator */ SSM_LISTED, /* On ssm_list */ SSM_REMOVING /* being removed from ssm_list */ } ss_ssm_state_t; #ifdef __cplusplus } #endif #endif /* _VM_SEG_SHARED_IMPL_H */