OSTAT(CXXLB)
Shore Programmer's Manual - 2 August 96
NAME
ostat \- retrieve information about an object
SYNOPSIS
#include <ShoreApp.h>
shrc Ref<T>::ostat(OStat *osp) const;
DESCRIPTION
Ostat
fills in the given OStat structure with information about the given object.
An alternate interface for objects that have pathnames is Shore::stat (see
stat(oc)
The OStat structure, defined in OCTypes.h, actually consists of three
types. OStat, itself, contains fields that are valid for all objects,
registered or anonymous. AnonStat has fields that are valid only for
anonymous objects, and RegStat has fields that are valid only for
registered objects. The
kind
field of OStat indicates whether an object is registered or anonymous. The
structures are defined as follows:
struct AnonStat
{
LOID pool; // loid of pool in which obj resides
};
struct RegStat
{
short nlink; // num. dir. entries pointing to object
mode_t mode; // permissions flags
uid_t uid; // owner
gid_t gid; // group
time_t atime; // access time
time_t mtime; // modify time
time_t ctime; // props change time
};
struct OStat
{
LOID loid; // object's logical oid
LOID type_loid; // loid of object's type object
ObjectSize csize; // core size
ObjectSize hsize; // heap size
int nindices; // number of indices in object
ObjectKind kind; // KindRegistered or KindAnonymous
AnonStat astat; // if kind == KindAnonymous
RegStat rstat; // if kind == KindRegistered
};
The values of the
kind
field are defined in
vas_types.h.
Although more values are defined in that
file, only two of those values,
KindRegistered
and
KindAnonymous,
can be found in the
kind
field.
Ostat
obtains a SH-mode (share-mode) lock on the given object.
VERSION
This manual page applies to Version 1.0 of theShore software.
SPONSORSHIP
The Shore project is sponsored by the Advanced Research Project Agency, ARPA order number 018 (formerly 8230), monitored by the U.S. Army Research Laboratory under contract DAAB07-92-C-Q508.
COPYRIGHT
Copyright (c) 1994, 1995, 1996 Computer Sciences Department, University of Wisconsin -- Madison. All Rights Reserved.SEE ALSO
stat(oc)
.