This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug testsuite/81690] libgomp.c/{target-32,thread-limit-2}.c fail for nvptx: missing usleep


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

--- Comment #3 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
(In reply to Thomas Schwinge from comment #2)
> Per PTX 3.1, "Table 141. Special Registers: %clock", "Special register
> %clock is an unsigned 32-bit read-only cycle counter that wraps silently",

Probably not too useful for implementing "usleep":
<http://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#time-function>,
<https://stackoverflow.com/questions/11217117/equivalent-of-usleep-in-cuda-kernel>.

> 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.)  ;-)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]