Incrementing of the clock begins with
the first stepping pulse after the clock
enters the set state.
When the clock is in the set state,
execution ofSTORE CLOCK causes condi
tion code0 to be set and the current
value of the running clock to be stored.
Error State: The clock entersthe error
state whena malfunction is detected
that is likely to have affected the
validity of the clock value. A timing
facility-damage machine-check-interrup
tion condition is generated on eachCPU which has access to that clock whenever it enters the error state.
WhenSTORE CLOCK is executed and the
clock accessedis in the error state,
condition code 2 is set, and the value
stored is unpredictable.
Not-OperationalState: The clock is in
the not-operational state when its power
is off or whenit is disabled for main
tenance. It depends on the model if the
clock can be placed in this state.
Whenever the clock enters the not
operational state, a timing-facility
damage machine-check-interruption
condition is generated on eachCPU that
has access to that clock.
When the clock is in the not-operational
state, execution ofSTORE CLOCK causes
condition code 3 to be set, and zerois stored. Changes in Clock State When the TOO clock accessed by a CPU changes value because of the execution
ofSET CLOCK or changes state, inter
ruption conditions pending for the clock
comparator,CPU timer, interval timer,
and TOD-clock-sync check mayor may not
be recognized for up to1.048576 seconds (2
20 microseconds) after the change. Setting and Inspecting the Clock The clock can be set to a specific value
by execution ofSET CLOCK if the manual TOO-clock control of any CPU in the
configuration isin the enable-set posi
tion.Setting the clock replaces the
values in all bit positions from bit
position0 through the rightmost posi
tion that is incremented when the clock
is running. However, on some models,
the rightmost bits starting at or to the
right of bit 52 of the specified value
are ignored, and zerosare placed in the corresponding positions of the clock. , The TOO executing
clock can be inspectedSTORE CLOCK, which causes
by
a
64-bit value to be stored. Two
executions ofSTORE CLOCK, possibly on
differentCPUs in the same
configuration, always store different
values if the clock is running or, if
separate clocks are accessed, both
clocksare running and are synchronized.
The values stored for a running clock
always correctly imply the sequence of
execution ofSTORE CLOCK on one or more CPUs for all cases where the sequence can be established by means of the
program.Zeros are stored in positions
to the right of the bit position that is
incremented. In a configuration with
more than oneCPU, however, when the
value of a running clock is stored,
nonzero values may be stored in posi
tions to the right of the rightmost
position thatis incremented. This
ensures that a unique value is stored.
In a configuration where more than oneCPU accesses the same clock, SET CLOCK is interlocked such that the entire
contents appear to be updated concur
rently; that is, ifSET CLOCK instructions are executed simultaneously
by twoCPUs, the final result is either
one or the other value. IfSET CLOCK is
executed on oneCPU and STORE CLOCK on
the other, the result obtained bySTORE CLOCK is either the entire old value or
the entire new value. WhenSET CLOCK is
executed by oneCPU, a STORE CLOCK executed on another CPU may find the
clock in the stopped state even when the
TOD-clock-sync-control bit is zero in
eachCPU. The TOD-clock-sync-control
bit is bit 2 of control registerO. Since the clock enters the set state
before incrementing, the firstSTORE CLOCK executed after the clock enters
the set state may still find the
original value introduced bySET CLOCK. Programming Notes
1. Bit position 31 of the clock is
incremented every1.048576 seconds;
for some applications, reference to
the leftmost 32bits of the clock
may provide sufficient resolution.
2.Communication between systems is
facilitated by establishing a stan
dard time origin, or standard
epoch, which is the calendar date
and time to which a clock value of
zero corresponds. January 1,1900, o a.m. Greenwich Mean Time (GMT) is
recommended as the standard epoch
for the clock.
3. A program using the clock value as
a time-of-day and calendar indi
cation must be consistent with the
programming support under which the
program is to be executed. If the
programming support uses the stand-Chapter 4. Control 4-25
the first stepping pulse after the clock
enters the set state.
When the clock is in the set state,
execution of
tion code
value of the running clock to be stored.
Error State: The clock enters
state when
that is likely to have affected the
validity of the clock value. A timing
facility-damage machine-check-interrup
tion condition is generated on each
When
clock accessed
condition code 2 is set, and the value
stored is unpredictable.
Not-Operational
the not-operational state when its power
is off or when
tenance. It depends on the model if the
clock can be placed in this state.
Whenever the clock enters the not
operational state, a timing-facility
damage machine-check-interruption
condition is generated on each
has access to that clock.
When the clock is in the not-operational
state, execution of
condition code 3 to be set, and zero
of
ruption conditions pending for the clock
comparator,
and TOD-clock-sync check mayor may not
be recognized for up to
20
by execution of
configuration is
tion.
values in all bit positions from bit
position
tion that is incremented when the clock
is running. However, on some models,
the rightmost bits starting at or to the
right of bit 52 of the specified value
are ignored, and zeros
clock can be inspected
by
a
64-bit value to be stored. Two
executions of
different
configuration, always store different
values if the clock is running or, if
separate clocks are accessed, both
clocks
The values stored for a running clock
always correctly imply the sequence of
execution of
program.
to the right of the bit position that is
incremented. In a configuration with
more than one
value of a running clock is stored,
nonzero values may be stored in posi
tions to the right of the rightmost
position that
ensures that a unique value is stored.
In a configuration where more than one
contents appear to be updated concur
rently; that is, if
by two
one or the other value. If
executed on one
the other, the result obtained by
the entire new value. When
executed by one
clock in the stopped state even when the
TOD-clock-sync-control bit is zero in
each
bit is bit 2 of control register
before incrementing, the first
the set state may still find the
original value introduced by
1. Bit position 31 of the clock is
incremented every
for some applications, reference to
the leftmost 32
may provide sufficient resolution.
2.
facilitated by establishing a stan
dard time origin, or standard
epoch, which is the calendar date
and time to which a clock value of
zero corresponds. January 1,
recommended as the standard epoch
for the clock.
3. A program using the clock value as
a time-of-day and calendar indi
cation must be consistent with the
programming support under which the
program is to be executed. If the
programming support uses the stand-