group/pintos/src/threads/fixed-point.h
/* Returns fixed-point number corresponding to N divided by D. */
Returns fixed-point number corresponding to N divided by D.
Returns fixed - point number corresponding to N divided by D .
static inline fixed_point_t
fix_frac (int n, int d)
{
  ASSERT (d != 0);
  ASSERT (n / d >= FIX_MIN_INT && n / d <= FIX_MAX_INT);
  return __mk_fix ((long long) n * FIX_F / d);
}
static inline fixed_point_t fix_frac ( int n , int d ) { ASSERT ( d != 0 ) ; ASSERT ( n / d >= FIX_MIN_INT && n / d <= FIX_MAX_INT ) ; return __mk_fix ( ( long long ) n * FIX_F / d ) ; }
Returns fixed-point number corresponding to N divided by D.
Returns fixed - point number corresponding to N divided by D .