https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81690

Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-08-30
                 CC|                            |tschwinge at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #2 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
Per PTX 3.1, "Table 141. Special Registers: %clock", "Special register %clock
is an unsigned 32-bit read-only cycle counter that wraps silently", which
possibly could be used to implemented "usleep" (in newlib)?  For that, we'd
first have to figure out what a "cycle" is.  Quite possibly, this will be
different per hardware architecture, so would need some newlib/libgcc startup
code.  Possibly it might also depend on the actual clock speed at run time,
which would make this more/too much convoluted, if at all practical?

(Best to avoid such "sleep" function usage, of course.)  ;-)

Reply via email to