Hello, I am currently working on sponsored project to upgrade dahdi to support some of newer Digium cards (namely TE235). During porting, I've noticed the following definition (in linux.h):
#define msecs_to_jiffies(msec) ((msec) / 1000 / HZ) I believe it is a bug. It may introduce some discrete problems (time-triggered). Unless I'm mistaken, linux' 'jiffies' is the same as system ticks. Therefore we want to get a number of system ticks that would 'happen' in 'msec' time. Given equation will always give 0 (rounded to integer), unless msec > 1000* HZ. I believe that formula should be: #define msecs_to_jiffies(msec) ((msec) * 1000 / HZ) But it could also be improved to secure some corner cases, e.g. like this: https://searchcode.com/codesearch/view/429809/ Am I missing something, or is it a bug ? Regards, -ŁW _______________________________________________ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"