/* * RISC-V supports both UDELAY and NDELAY. This is largely the same as above, * but with different constants. I added 10 bits to the shift to get this, but * the result is that I need a 64-bit multiply, which is slow on 32-bit * platforms. * * NDELAY_MULT = 2^41 * HZ / 1000000000 * = (2^41 / 1000000000) * HZ * = 2199.02325555 * HZ * = 2199 * HZ + 23255550 * HZ / 1000000000 * * The maximum here is to avoid 64-bit overflow, but it isn't checked as it * won't happen.
*/ #define MAX_NDELAY_NS (1ULL << 42) #define MAX_NDELAY_HZ MAX_UDELAY_HZ #define NDELAY_MULT ((unsignedlonglong)(2199ULL * HZ + 23255550ULL * HZ / 1000000000ULL)) #define NDELAY_SHIFT 41
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.