代码之家  ›  专栏  ›  技术社区  ›  md.jamal

如何让用户比复制用户更快

  •  0
  • md.jamal  · 技术社区  · 6 年前

    我在编写字符设备驱动程序的示例程序时,在Oreilly Linux设备驱动程序的高级字符驱动程序一章中找到了这个。

    put_user(datum, ptr)
    _ _put_user(datum, ptr)
    These macros write the datum to user space; they are relatively fast and should be called instead of copy_to_user whenever single values are being transferred.
    

    有谁能给我解释一下这些宏比拷贝到用户快多少。

    谢谢你的时间和耐心

    0 回复  |  直到 6 年前