- 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
- 专题02+时事热点(精讲课件)2025年中考地理二轮复习讲练测(安徽专用).pptx
- 专题10+经济建设 2025年中考道德与法治二轮复习讲练测(广东专用).pptx
- 专题02+西游记【名著概览】+-+2025年中考语文必读名著演练.pptx
- 专题七+认识国家(课件)-【省心备考】2025年中考地理一轮复习优质课件.pptx
- 第22课《礼记》二则——《大道之行也》(课件)-2024-2025学年八年级语文下册同步备课精品资源.pptx
- 跨学科实践15:制作“龙骨水车”(课件)-2024-2025学年八年级物理下学期项目化课程案例.pptx
- 第13课_辽宋夏金元时期的对外交流(课件)2024-2025学年七年级历史下册同步教学课件.pptx
- 选择题专项讲解——综合类(课件)2025年初中道德与法治中考选择题练习.pptx
- 第21课《庄子》二则——《北冥有鱼》(课件)-2024-2025学年八年级语文下册同步备课精品资源.pptx
- 7.3+感受澳大利亚(第二课时)-2025学年七年级地理下册同步精品课堂(晋教版2024).pptx
最近下载
- 第16讲 光的直线传播-2024年新八年级物理暑假提升自学课讲义(人教版2024)(解析版).docx VIP
- 国际商法教案.docx VIP
- 2025年鼎和财产保险股份有限公司人员招聘笔试备考试题及答案解析.docx
- 飞机发电机讲解.ppt
- 大数据与人工智能智慧树知到期末考试答案2024年.docx
- 2024年广东深圳市龙岗区总工会社会化工会工作者招聘笔试参考题库附带答案详解.pdf VIP
- 2024年贵州省中考适应性考试九年级数学试题和答案详解.docx
- 大学物理实验坐标纸.doc
- 小学低年级数学游戏教学的问题与对策研究——以开福区荷叶小学为例.docx VIP
- 直流电机PWM控制调速系统设计.doc VIP
文档评论(0)