在好例子网,分享、交流、成长!
您当前所在位置:首页C/C++ 开发实例嵌入式开发 → QNX Neutrino RTOS.pdf

QNX Neutrino RTOS.pdf

嵌入式开发

下载此实例
  • 开发语言:C/C++
  • 实例大小:1.55M
  • 下载次数:15
  • 浏览次数:415
  • 发布时间:2020-08-27
  • 实例类别:嵌入式开发
  • 发 布 人:wudeyangll
  • 文件格式:.pdf
  • 所需积分:2
 相关标签: QNX

实例介绍

【实例简介】Getting Started with QNX Neutrino: A Guide for Realtime Programmers

【实例截图】

from clipboard

【核心代码】

About This Guide xi
What you’ll find in this guide xiii
Typographical conventions xiii
Note to Windows users xiv
Technical support xv
Foreword to the First Edition by Peter van der Veen 1
Preface to the First Edition by Rob Krten 5
A little history 8
Who this book is for 8
What’s in this book? 8
Processes and Threads 9
Message Passing 9
Clocks, Timers, and Getting a Kick Every So Often 9
Interrupts 9
Resource Managers 9
QNX 4 to QNX Neutrino 9
Calling 911 10
Glossary 10
Index 10
Other references 10
About Rob Krten 10
Acknowledgments 10
1 Processes and Threads 13
Process and thread fundamentals 15
A process as a house 15
The occupants as threads 15
Back to processes and threads 15
Mutual exclusion 16
Priorities 17
Semaphores 17
A semaphore as a mutex 18
The kernel’s role 19
June 14, 2012 Contents iii
© 2012, QNX Software Systems Limited
Single CPU 19
Multiple CPU (SMP) 19
The kernel as arbiter 19
Kernel states 24
Threads and processes 26
Why processes? 26
Starting a process 27
Starting a thread 36
More on synchronization 57
Readers/writer locks 57
Sleepon locks 59
Condition variables 63
Additional Neutrino services 68
Pools of threads 69
Scheduling and the real world 76
Rescheduling — hardware interrupts 77
Rescheduling — kernel calls 77
Rescheduling — exceptions 77
Summary 78
2 Message Passing 79
Messaging fundamentals 81
A small microkernel and message passing 81
Message passing and client/server 82
Network-distributed message passing 85
What it means for you 85
The philosophy of Neutrino 86
Multiple threads 86
Server/subserver 87
Some examples 89
Using message passing 90
Architecture & structure 91
The client 91
The server 93
The send-hierarchy 97
Receive IDs, channels, and other parameters 97
Multipart messages 108
Pulses 113
Receiving a pulse message 114
The MsgDeliverEvent() function 117
Channel flags 118
iv Contents June 14, 2012
© 2012, QNX Software Systems Limited
Message passing over a network 124
Networked message passing differences 126
Some notes on NDs 128
Priority inheritance 130
So what’s the trick? 133
Summary 134
3 Clocks, Timers, and Getting a Kick Every So Often 135
Clocks and timers 137
Operating periodically 137
Clock interrupt sources 139
Base timing resolution 140
Timing jitter 140
Types of timers 141
Notification schemes 142
Using timers 146
Creating a timer 146
Signal, pulse, or thread? 147
What kind of timer? 147
A server with periodic pulses 149
Timers delivering signals 157
Timers creating threads 157
Getting and setting the realtime clock and more 157
Advanced topics 159
Other clock sources 160
Kernel timeouts 163
Summary 165
4 Interrupts 167
Neutrino and interrupts 169
Interrupt service routine 170
Level-sensitivity versus edge-sensitivity 172
Writing interrupt handlers 175
Attaching an interrupt handler 175
Now that you’ve attached an interrupt 176
Detaching an interrupt handler 177
The flags parameter 178
The interrupt service routine 178
ISR functions 186
Summary 188
June 14, 2012 Contents v
© 2012, QNX Software Systems Limited
5 Resource Managers 189
What is a resource manager? 191
Examples of resource managers 191
Characteristics of resource managers 192
The client’s view 192
Finding the server 193
Finding the process manager 194
Handling directories 195
Union’d filesystems 196
Client summary 198
The resource manager’s view 199
Registering a pathname 199
Handling messages 200
The resource manager library 200
The library really does what we just talked about 202
Behind the scenes at the library 203
Writing a resource manager 204
Data structures 205
Resource manager structure 211
POSIX-layer data structures 219
Handler routines 226
General notes 226
Connect functions notes 228
Alphabetical listing of connect and I/O functions 230
io_chmod() 230
io_chown() 231
io_close_dup() 231
io_close_ocb() 232
io_devctl() 233
io_dup() 234
io_fdinfo() 235
io_link() 235
io_lock() 236
io_lock_ocb() 237
io_lseek() 237
io_mknod() 238
io_mmap() 239
io_mount() 240
io_msg() 240
io_notify() 241
io_open() 242
vi Contents June 14, 2012
© 2012, QNX Software Systems Limited
io_openfd() 243
io_pathconf() 243
io_power() 244
io_read() 244
io_readlink() 245
io_rename() 246
io_shutdown() 247
io_space() 247
io_stat() 248
io_sync() 248
io_unblock() [CONNECT] 249
io_unblock() [I/O] 250
io_unlink() 250
io_unlock_ocb() 251
io_utime() 251
io_write() 252
Examples 253
The basic skeleton of a resource manager 253
A simple io_read() example 255
A simple io_write() example 260
A simple io_devctl() example 263
An io_devctl() example that deals with data 266
Advanced topics 269
Extending the OCB 269
Extending the attributes structure 271
Blocking within the resource manager 272
Returning directory entries 273
Summary 283
A QNX 4 to Neutrino 285
QNX 4 and Neutrino 287
Similarities 287
Improvements 287
Porting philosophy 291
Message passing considerations 291
Interrupt service routines 301
Summary 302
B Calling 911 303
Seeking professional help 305
So you’ve got a problem. . . 305
June 14, 2012 Contents vii
© 2012, QNX Software Systems Limited
Training 309
C Sample Programs 311
atoz.c 313
time1.c 317
tp1.c 321
tt1.c 323
Glossary 325
Index 335

标签: QNX

实例下载地址

QNX Neutrino RTOS.pdf

不能下载?内容有错? 点击这里报错 + 投诉 + 提问

好例子网口号:伸出你的我的手 — 分享

网友评论

发表评论

(您的评论需要经过审核才能显示)

查看所有0条评论>>

小贴士

感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。

  • 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
  • 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
  • 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
  • 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。

关于好例子网

本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明

;
报警