#ifndef _LINUX_DELAY_H #define _LINUX_DELAY_H /* * Copyright (C) 1993 Linus Torvalds * * Delay routines, using a pre-computed "loops_per_jiffy" value. */ #include <linux/kernel.h> extern unsigned long loops_per_jiffy; #include <asm/delay.h> /* * Using udelay() for intervals greater than a few milliseconds can * risk overflow for high loops_per_jiffy (high bogomips) machines. The * mdelay() provides a wrapper to prevent this. For delays greater * than MAX_UDELAY_MS milliseconds, the wrapper is used. Architecture * specific values can be defined in asm-???/delay.h as an override. * The 2nd mdelay() definition ensures GCC will optimize away the * while loop for the common cases where n <= MAX_UDELAY_MS -- Paul G. */ #ifndef MAX_UDELAY_MS #define MAX_UDELAY_MS 5 #endif #ifndef mdelay #define mdelay(n) (\ (__builtin_constant_p(n) && (n)<=MAX_UDELAY_MS) ? udelay((n)*1000) : \ ({unsigned long __ms=(n); while (__ms--) udelay(1000);})) #endif #ifndef ndelay
static inline void ndelay(unsigned long x) { udelay(DIV_ROUND_UP(x, 1000)); }Contributors
Person | Tokens | Prop | Commits | CommitProp | |
andrew morton | andrew morton | 21 | 100.00% | 1 | 100.00% |
Total | 21 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
jeff garzik | jeff garzik | 18 | 100.00% | 1 | 100.00% |
Total | 18 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
pre-git | pre-git | 37 | 27.61% | 5 | 31.25% |
andrew morton | andrew morton | 25 | 18.66% | 1 | 6.25% |
jeff garzik | jeff garzik | 18 | 13.43% | 1 | 6.25% |
patrick pannuto | patrick pannuto | 12 | 8.96% | 1 | 6.25% |
linus torvalds | linus torvalds | 11 | 8.21% | 1 | 6.25% |
maximilian attems | maximilian attems | 9 | 6.72% | 1 | 6.25% |
greg kroah-hartman | greg kroah-hartman | 8 | 5.97% | 1 | 6.25% |
david howells | david howells | 6 | 4.48% | 1 | 6.25% |
alok kataria | alok kataria | 5 | 3.73% | 2 | 12.50% |
anton blanchard | anton blanchard | 2 | 1.49% | 1 | 6.25% |
benjamin herrenschmidt | benjamin herrenschmidt | 1 | 0.75% | 1 | 6.25% |
Total | 134 | 100.00% | 16 | 100.00% |