#include <SerialAsync.h>
Classes | |
class | Request |
The type for a request. | |
Public Types | |
typedef IterateScheduler < SerialAsync > | IterateScheduler_t |
typedef Iterate< SerialAsync > | Iterate_t |
Public Member Functions | |
DataObject (int affinity=-1) | |
Construct the data object with an empty set of requests and the given affinity. | |
DataObject (int affinity, IterateScheduler< SerialAsync > &) | |
for compatibility with other SMARTS schedulers, accept Scheduler arguments (unused) | |
int | affinity () const |
Stub out affinity because there is no affinity in serial. | |
void | affinity (int) |
Stub out affinity because there is no affinity in serial. | |
void | request (Iterate< SerialAsync > &, SerialAsync::Action) |
An iterate makes a request for a certain action in a certain generation. | |
void | release (SerialAsync::Action) |
An iterate finishes and tells the DataObject it no longer needs it. | |
Friends | |
class | IterateScheduler< SerialAsync > |
class | Iterate< SerialAsync > |
The DataObject Class is used introduce a type to represent a resources (normally) blocks of data) that Iterates contend for atomic access. Iterates make request for either a read or write to the DataObjects. DataObjects may grant the request if the object is currently available. Otherwise, the request is enqueue in a queue private to the data object until the DataObject is release by another Iterate. A set of read requests may be granted all at once if there are no intervening write request to that DataObject. DataObject<SerialAsync> is a specialization of DataObject for the policy template SerialAsync.
There are two ways data can be used: to read or to write. Don't change this to give more than two states; things inside depend on that.
typedef IterateScheduler<SerialAsync> Smarts::DataObject< SerialAsync >::IterateScheduler_t |
typedef Iterate<SerialAsync> Smarts::DataObject< SerialAsync >::Iterate_t |
Smarts::DataObject< SerialAsync >::DataObject | ( | int | affinity = -1 |
) | [inline] |
Construct the data object with an empty set of requests and the given affinity.
Smarts::DataObject< SerialAsync >::DataObject | ( | int | affinity, | |
IterateScheduler< SerialAsync > & | ||||
) | [inline] |
for compatibility with other SMARTS schedulers, accept Scheduler arguments (unused)
int Smarts::DataObject< SerialAsync >::affinity | ( | ) | const [inline] |
Stub out affinity because there is no affinity in serial.
void Smarts::DataObject< SerialAsync >::affinity | ( | int | ) | [inline] |
Stub out affinity because there is no affinity in serial.
void Smarts::DataObject< SerialAsync >::request | ( | Iterate< SerialAsync > & | it, | |
SerialAsync::Action | act | |||
) | [inline] |
An iterate makes a request for a certain action in a certain generation.
void DataObject::request(Iterate&, action) An iterate makes a reservation with this DataObject for a given action in a given generation.
The request may be granted immediately.
References Smarts::Iterate< SerialAsync >::notifications_m, Smarts::Iterate< SerialAsync >::notify(), and Smarts::SerialAsync::Read.
void Smarts::DataObject< SerialAsync >::release | ( | SerialAsync::Action | ) | [inline] |
An iterate finishes and tells the DataObject it no longer needs it.
If this is the last release for the current set of requests, have the IterateScheduler release some more.
friend class IterateScheduler< SerialAsync > [friend] |
friend class Iterate< SerialAsync > [friend] |