- 1、本文档共20页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
《alp-apB-low-level-io》.pdf
B
Low-Level I/O
CPROGRAMMERS ON GNU/LINUX HAVE TWO SETS OF INPUT/OUTPUT functions at
their disposal.The standard C library provides I/O functions: printf, fopen, and so
1
on. The Linux kernel itself provides another set of I/O operations that operate at a
lower level than the C library functions.
Because this book is for people who already know the C language, we’ll assume
that you have encountered and know how to use the C library I/O functions.
Often there are good reasons to use Linux’s low-level I/O functions. Many of these
are kernel system calls2 and provide the most direct access to underlying system capa-
bilities that is available to application programs. In fact, the standard C library I/O
routines are implemented on top of the Linux low-level I/O system calls. Using the
latter is usually the most efficient way to perform input and output operations—and is
sometimes more convenient, too.
1.The C++ standard library provides iostreams with similar functionality.The standard C
library is also available in the C++ language.
2. See Chapter 8, “Linux System Calls,” for an explanation of the difference between a system
call and an ordinary function call.
282 Appendix B Low-Level I/O
Throughout this book, we assume that you’re familiar with the calls described in this
appendix.You may already be familiar with them because they’re nearly the same as
those provided on other UNIX and UNIX-like operating systems (and on the Win32
platform as well). If you’re not familiar with them, however, read on; you’ll find the
rest of the book much easier to understand if you familiarize yourself with this
material first.
B.1 Reading and Writing Data
The first I/O function you li
您可能关注的文档
- 《A Hat》.pdf
- 《A High Power Light Triggered Triac with a novel light senstive structure》.pdf
- 《A hybrid extended finite element level set method for modeling phase transformations》.pdf
- 《A Label-Free Immunoassay Based Upon Localized Surface Plasmon Resonance of Gold Nanorods》.pdf
- 《a lesson in a lab》.ppt
- 《A LEVEL 2012》.pdf
- 《A LEVEL 2013》.pdf
- 《A LEVEL 2016》.pdf
- 《A Level Chemistry Syllabus》.pdf
- 《A level _w10_qp_2》.pdf
最近下载
- 2024年6月8日上海市税务局遴选面试真题及答案解析.doc VIP
- 水浒传读书分享.pptx VIP
- 老旧小区电力线路改造方案.docx VIP
- 2025年信阳职业技术学院单招职业技能测试题库精编答案.docx
- 杭州西奥电梯XO-CON8642调试说明书.pdf
- 2024年1月27日苏州市税务局遴选公务员面试真题及答案解析.doc VIP
- 我们是共产主义接班人(课件)全国通用二年级下册综合实践活动.pptx
- 2025年湖南省事业单位招聘考试《公共基础知识》全真模拟卷及答案(共八套) .pdf
- 2025届高考英语二轮复习:非谓语动词课件 (共49张PPT).ppt.pptx VIP
- 2024年1月21日安徽省阜阳市税务局遴选面试真题及答案解析.doc VIP
文档评论(0)