使用asm/div64.h中宏do_div

#include <asm/div64.h>

unsigned long long x,y,result;

unsigned long mod;

mod = do_div(x,y);

result = x;

    64 bit division 结果保存在x中;余数保存在返回结果中。

相关文章:

  • 2021-08-23
  • 2022-12-23
  • 2021-10-13
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
  • 2022-01-07
猜你喜欢
  • 2022-12-23
  • 2021-12-07
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案