Shuttle server code is found in shtl/ShtlSrv.h and
shtl/ShtlSrv.C.
<ShtlSrv.h*>= <Read the literate code instead warning. > #ifndef __OFF_SHTL_SRV_H #define __OFF_SHTL_SRV_H 1 <Off shuttle server dependencies. > #ifdef __KERNEL__ <Off shuttle server. > <Off shuttle server exported variables. > #endif // __KERNEL__ #ifdef __KERNEL__ <off_ShtlSrv::make_availableimplementation. > <off_ShtlSrv::is_localimplementation. > <off_ShtlSrv::validimplementation. > <off_ShtlSrv::operator+implementation. > #endif // __KERNEL__ #endif // __OFF_SHTL_SRV_H
<ShtlSrv.C*>= <Read the literate code instead warning. > #include <shtl/ShtlSrv.h> // Exported interface. <Off shuttle server implementation dependencies. > <Off shuttle server static members. > <Off shuttle server global variables. > <off_ShtlSrv::off_ShtlSrvimplementation. > <off_ShtlSrv::get_allocatorimplementation. > <off_ShtlSrv::startimplementation. > <off_ShtlSrv::allocandfreeimplementation. > <off_ShtlSrv::notifyimplementation. > <off_ShtlSrv::operator<<implementation. > <off_ShtlSrv::nameofimplementation. > <off_ShtlSrv::get_urlimplementation. >
Shuttle code is in shtl/Shtl.h and shtl/Shtl.C.
<Shtl.h*>= <Read the literate code instead warning. > #ifndef __OFF_SHTL_H #define __OFF_SHTL_H 1 <Off shuttle dependencies. > <Off shuttle flag bits. > <Off shuttle server predefined properties numbers. > #ifdef __KERNEL__ <Off shuttle. > #endif // __KERNEL__ #ifdef __KERNEL__ // Inline methods for off_Shtl // <Off shuttle late dependencies. > <off_Shtl::get_pcimplementation. > <off_Shtl::get_regset al. implementation. > <off_Shtl::get_next_regsimplementation. > <off_Shtl::set_uctxandset_kctximplementation. > <off_Shtl::is_usrioimplementation. > <off_Shtl::get_prtyandoff_Shtl::set_prtyimplementation. > <off_Shtl::get_dtlbandset_dtlbimplementation. > <off_Shtl::is_blockedimplementation. > <off_Shtl::is_yieldingimplementation. > <off_Shtl::yields_toimplementation. > <off_Shtl::is_runninget al. implementation. > <off_Shtl::validimplementation. > #endif // __KERNEL__ #endif // __OFF_SHTL_H
<Shtl.C*>= <Read the literate code instead warning. > #include <shtl/Shtl.h> // Exported interface. <Off shuttle implementation dependencies. > <Off shuttle static members. > <off_Shtl::off_Shtlimplementation. > <off_Shtl::selfimplementation. > <off_Shtl::blockandunblockimplementation. > <off_Shtl::yieldimplementation. > <off_Shtl::def_propimplementation. > <off_Shtl::set_propimplementation. > <off_Shtl::get_allocatorimplementation. > <off_Shtl::operator newimplementation. > <off_Shtl::operator deleteimplementation. > <off_Shtl::switch_toimplementation. > <off_Shtl::get_url_holderimplementation. > <off_Shtl::usrio_enableandusrio_disableimplementation. > <off_Shtl::get_propimplementation. >
Shuttle property code is in ShtlProp.h and ShtlProp.C.
<ShtlProp.h*>= <Read the literate code instead warning. > #ifndef __OFF_SHTL_PROP_H #define __OFF_SHTL_PROP_H 1 <Off shuttle property dependencies. > <Off shuttle property identifer. > #ifdef __KERNEL__ <Off shuttle property server. > <Off shuttle property. > <Off off-kernel shuttle property server. > #endif // __KERNEL__ #ifdef __KERNEL__ <off_ShtlProp::set_valandget_valimplementation. > <off_ShtlProp::pswitchimplementation. > #endif // __KERNEL__ #endif // __OFF_SHTL_PROP_H
<ShtlProp.C*>= <Read the literate code instead warning. > #include <shtl/ShtlProp.h> // Exported interface. <Off shuttle property implementation dependencies. > <off_ShtlProp::off_ShtlPropimplementation. > <off_ShtlProp::psetandpclrimplementation. > <off_ShtlProp::operator newimplementation. >
The property allocator is in shtl/ShtlPropAllocator.h and
shtl/ShtlPropAllocator.C.
<ShtlPropAllocator.h*>= <Read the literate code instead warning. > #ifndef __OFF_SHTL_PROP_ALLOC_H #define __OFF_SHTL_PROP_ALLOC_H 1 <Off shuttle property allocator dependencies. > #ifdef __KERNEL__ <Off shuttle property allocator. > #endif // __KERNEL__ #endif // __OFF_SHTL_PROP_ALLOC_H
<ShtlPropAllocator.C*>= <Read the literate code instead warning. > #include <shtl/ShtlPropAllocator.h> // Exported interface. <Off shuttle property allocator static members. >
\subsection{Shuttles for ix86 based architectures}
There is no machine dependent shuttle server code. However, a dummy machine dependent shuttle server is provided so that the node server could create the shuttle server as it does with remaining servers.
<Off machine dependent shuttle server. >= (U->)
// A machine dependent shuttle server.
//
class off_mdepShtlSrv {
public:
static natural_t how_many(void) { return 1;}
off_mdepShtlSrv(natural_t i) { (void)i; }
};
Definesoff_mdepShtlSrv(links are to index).
<Off machine dependent shuttle server dependencies. >= (U->) #include <flux/types.h> // for boolean_t natural_t et al.
Machine dependent shuttles provide the low-level glue code and data
needed to implement shuttles. We have seen most of the routines
provided by mdepShtls.
<Off machine dependent shuttle. >= (U->)
// A machine dependent shuttle.
//
class off_mdepShtl {
public:
// Finds the next register frame in the shuttle stack
off_ProcRegs *get_next_regs(const off_ProcRegs *r);
// Enables user IO
inline void usrio_enable(off_mdepProcRegs *r);
// Disables user IO
inline void usrio_disable(off_mdepProcRegs *r);
// Sets the machine dependent protection domain for this dtlb.
// NB: an off_dtlb_id_t must contain the dtlb cr3 as the offset on Intels.
inline void set_dtlb(natural_t dtlb_cr3);
static natural_t get_sp(void) { return get_esp(); }
<Other public methods of off_mdepShtl. >
protected:
<Other protected methods of off_mdepShtl. >
private:
<Other private members of off_mdepShtl. >
};
Definesoff_mdepShtl(links are to index).
<Off machine dependent shuttle dependencies. >= (U->) [D->] #include <flux/machine/proc_reg.h> // for get_esp and get_eip. #include <flux/types.h> // for boolean_t natural_t et al. class off_ProcRegs;
<Off machine dependent shuttle late dependencies. >= (U->) #include <hw/Processor.h> // for off_ProcRegs
\subsubsection{Support for hardwired properties}\label{sc:mdepsmpshtl}
To enable and disable user level IO we use the IOPL field in the
eflags.
<off_mdepShtl::usrio_enable implementation. >= (U->)
// Enables user IO
inline void off_mdepShtl::usrio_enable(off_mdepProcRegs *r)
{
r->p_ts.eflags |= EFL_IOPL_USER;
}
<off_mdepShtl::usrio_disable implementation. >= (U->)
// Disables user IO
inline void off_mdepShtl::usrio_disable(off_mdepProcRegs *r)
{
r->p_ts.eflags &= ~EFL_IOPL_USER;
}
As of today, get_next_regs is not implemented.
<off_mdepShtl::get_next_regs implementation. >= (U->)
// Finds the next register frame in the shuttle stack
off_ProcRegs *off_mdepShtl::get_next_regs(const off_ProcRegs *r)
{
(void)r;
return NULL;
}
<off_mdepShtl::set_dtlb implementation. >= (U->)
// Sets the machine dependent protection domain for this dtlb.
// NB: an off_dtlb_id_t must contain the dtlb cr3 as the offset on Intels.
inline void off_mdepShtl::set_dtlb(natural_t dtlb_cr3)
{
set_pdbr(dtlb_cr3);
}
<Off machine dependent shuttle dependencies. >+= (U->) [<-D->] #include <flux/machine/paging.h> // for set_pdbr