On z-architecture, only machine instructions that change or set the TOD
clock are privileged. The STCK and STCKE instructions only provide
read-only access to the TOD clock and are not privileged or restricted
by hardware, but they are not taught in programming texts either.
Most who are hard core enough to stumble across them in the PoOP manual
tend to be put off by somewhat unusual value format and realize that
direct usage of TOD values doesn't make much sense in the application
world, especially when there are system calls and runtime subroutines
that already do all the hard work of converting TOD values into other
more-practical-to-use timestamp formats.
So, they are not restricted, but one would have to be a dumb application
programmer to use an actual TOD value as an application-level timestamp,
and dumb programmers would not typically be the ones inclined to study
the PoOP manual.
Joel C Ewing
On 3/24/23 21:22, Paul Gilmartin wrote:
On Fri, 24 Mar 2023 19:44:32 -0500, Tom Marchant wrote:
How do they accomplish that?
Privileged instruction, like I/O or LPSW or SCK.
In fact, I'm not certain that the clock is protected, but the user interfaces
such as time()
and strftime()mare so useful *and*portable* that I've never been inclined to
look deeper.
On Fri, 24 Mar 2023 18:07:51 -0500, Paul Gilmartin wrote:
But most systems I use admirably do not allow non-privileged users to access
the hardware clock.
--
Joel C. Ewing
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN