在好例子网,分享、交流、成长!
您当前所在位置:首页Others 开发实例Clojure → qnx学习资料

qnx学习资料

Clojure

下载此实例
  • 开发语言:Others
  • 实例大小:1.61M
  • 下载次数:5
  • 浏览次数:62
  • 发布时间:2023-01-04
  • 实例类别:Clojure
  • 发 布 人:lewisyu
  • 文件格式:.pdf
  • 所需积分:2
 相关标签: QNX 资料 NX 学习

实例介绍

【实例简介】qnx学习资料

【实例截图】

【核心代码】

About This Book xv
What you’ll find in this guide xvii
Recommended reading xviii
Typographical conventions xviii
Note to Windows users xix
Technical support xix
Compiling and Debugging 1 1
Choosing the version of the OS 3
Making your code more portable 3
Conforming to standards 4
Including QNX- or Neutrino-specific code 6
Header files in /usr/include 6
Self-hosted or cross-development 7
A simple example 7
Self-hosted 8
Cross-development with network filesystem 8
Cross-development with debugger 9
Cross-development, deeply embedded 9
Using libraries 11
Static linking 12
Dynamic linking 12
Runtime loading 12
Static and dynamic libraries 12
Platform-specific library locations 13
Linking your modules 14
Creating shared objects 15
Optimizing the runtime linker 15
Lazy binding 16
RTLD_LAZY 18
Lazy loading 19
Diagnostics and debugging 21
Environment variables 21
June 14, 2012 Contents iii
© 2012, QNX Software Systems Limited
Debugging 22
Debugging in a self-hosted environment 22
Debugging in a cross-development environment 23
The GNU debugger ( gdb ) 23
The process-level debug agent 24
A simple debug session 29
Configure the target 29
Compile for debugging 29
Start the debug session 29
Get help 30
Sample boot image 32
Debugging using libmudflap 33
Programming Overview 35 2
Process model 37
An application as a set of processes 37
Processes and threads 39
Some definitions 39
Priorities and scheduling 40
Priority range 40
BLOCKED and READY states 41
The ready queue 42
Suspending a running thread 43
When the thread is blocked 43
When the thread is preempted 43
When the thread yields 43
Scheduling policies 43
FIFO scheduling 46
Round-robin scheduling 46
Sporadic scheduling 47
Why threads? 47
Summary 48
Processes 49 3
Starting processes — two methods 51
Process creation 51
Concurrency 52
Using fork() and forkpty() 53
Inheriting file descriptors 53
Process termination 54
Normal process termination 54
iv Contents June 14, 2012
© 2012, QNX Software Systems Limited
Abnormal process termination 54
Effect of parent termination 55
Detecting process termination 56
Using the High Availability Framework 56
Detecting termination from a starter process 57
Sample parent process using wait() 57
Sample parent process using sigwaitinfo() 58
Detecting dumped processes 60
Detecting the termination of daemons 63
Detecting client termination 63
Controlling processes via the /proc filesystem 63
Establishing a connection 64
Reading and writing the process’s address space 65
Manipulating a process or thread 66
Thread information 68
DCMD_PROC_BREAK 72
DCMD_PROC_CHANNELS 72
DCMD_PROC_CLEAR_FLAG 73
DCMD_PROC_CURTHREAD 73
DCMD_PROC_EVENT 73
DCMD_PROC_FREEZETHREAD 74
DCMD_PROC_GETALTREG 74
DCMD_PROC_GETFPREG 74
DCMD_PROC_GETGREG 75
DCMD_PROC_GETREGSET 75
DCMD_PROC_GET_BREAKLIST 75
DCMD_PROC_INFO 76
DCMD_PROC_IRQS 76
DCMD_PROC_MAPDEBUG 76
DCMD_PROC_MAPDEBUG_BASE 77
DCMD_PROC_MAPINFO 77
DCMD_PROC_PAGEDATA 78
DCMD_PROC_RUN 78
DCMD_PROC_SETALTREG 79
DCMD_PROC_SETFPREG 80
DCMD_PROC_SETGREG 80
DCMD_PROC_SETREGSET 80
DCMD_PROC_SET_FLAG 80
DCMD_PROC_SIGNAL 81
DCMD_PROC_STATUS 81
DCMD_PROC_STOP 81
June 14, 2012 Contents v
© 2012, QNX Software Systems Limited
DCMD_PROC_SYSINFO 82
DCMD_PROC_THAWTHREAD 82
DCMD_PROC_THREADCTL 82
DCMD_PROC_TIDSTATUS 83
DCMD_PROC_TIMERS 83
DCMD_PROC_WAITSTOP 83
Tick, Tock: Understanding the Neutrino Microkernel’s 4
Concept of Time 85
What’s a tick? 87
Oversleeping: errors in delays 87
Delaying for a second: inaccurate code 87
Timer quantization error 88
The tick and the hardware timer 88
Delaying for a second: better code 89
Another hiccup with hardware timers 89
Where’s the catch? 91
What time is it? 92
Transparent Distributed Processing Using Qnet 95 5
What is Qnet? 97
Benefits of Qnet 97
What works best 97
What type of application is well-suited for Qnet? 98
How does it work? 99
Locating services using GNS 101
Quality of Service (QoS) and multiple paths 108
Designing a system using Qnet 110
The product: a telecom box 110
Developing your distributed system 111
Configuring the data cards 111
Configuring the controller card 112
Enhancing reliability via multiple transport buses 112
Redundancy and scalability using multiple controller cards 113
Autodiscovery vs static 114
When should you use Qnet, TCP/IP, or NFS? 115
Drivers for Qnet 117
Writing an Interrupt Handler 119 6
What’s an interrupt? 121
Interrupts on multicore systems 121
vi Contents June 14, 2012
© 2012, QNX Software Systems Limited
Attaching and detaching interrupts 122
Interrupt Service Routine (ISR) 123
Determining the source of the interrupt 123
Servicing the hardware 124
Updating common data structures 126
Signalling the application code 127
Running out of interrupt events 130
Problems with shared interrupts 130
Advanced topics 131
Interrupt environment 131
Ordering of shared interrupts 131
Interrupt latency 131
Atomic operations 132
Heap Analysis: Making Memory Errors a Thing of the 7
Past 133
Introduction 135
Dynamic memory management 135
Arena allocations 135
Small block configuration 137
Heap corruption 140
Common sources 142
Detecting and reporting errors 143
Using the malloc debug library 144
Controlling the level of checking 147
Other environment variables 151
Caveats 152
Manual checking (bounds checking) 153
Getting pointer information 153
Memory leaks 154
Tracing 154
Causing a trace and giving results 155
Analyzing dumps 155
Compiler support 156
C issues 156
Freedom from Hardware and Platform 8
Dependencies 159
Common problems 161
I/O space vs memory-mapped 161
Big-endian vs little-endian 161
June 14, 2012 Contents vii
© 2012, QNX Software Systems Limited
Alignment and structure packing 163
Atomic operations 163
Solutions 163
Determining endianness 163
Swapping data if required 164
Accessing unaligned data 165
Examples 165
Accessing I/O ports 167
Conventions for Recursive Makefiles and 9
Directories 169
Structure of a multiplatform source tree 171
Makefile structure 172
The recurse.mk file 172
Macros 173
Directory levels 174
Specifying options 175
The common.mk file 175
The variant-level makefile 176
Recognized variant names 176
Using the standard macros and include files 177
The qconfig.mk include file 178
The qrules.mk include file 180
The qtargets.mk include file 183
Advanced topics 185
Collapsing unnecessary directory levels 185
Performing partial builds 186
Performing parallel builds 186
More uses for LIST 187
GNU configure 187
Examples of creating Makefile s 190
A single application 191
A library and an application 194
POSIX Conformance 197 A
Conformance statement 199
System interfaces: general attributes 199
File handling 216
Internationalized system interfaces 216
Threads 216
Realtime 217
viii Contents June 14, 2012
© 2012, QNX Software Systems Limited
Realtime threads 218
C-language compilation environment 218
POSIX Conformance Document (PCD) 219
Base Definitions 219
System Interfaces 230
Non-POSIX functions with POSIX-sounding names 248
Using GDB 251 B
Neutrino-specific extensions 253
A quick overview of starting the debugger 253
GDB commands 254
Command syntax 254
Command completion 255
Getting help 256
Running programs under GDB 258
Compiling for debugging 258
Setting the target 259
Starting your program 259
Your program’s arguments 260
Your program’s environment 261
Your program’s input and output 262
Debugging an already-running process 262
Killing the process being debugged 263
Debugging programs with multiple threads 263
Debugging programs with multiple processes 264
Stopping and continuing 265
Breakpoints, watchpoints, and exceptions 265
Continuing and stepping 276
Signals 278
Stopping and starting multithreaded programs 280
Examining the stack 281
Stack frames 281
Backtraces 282
Selecting a frame 283
Information about a frame 284
MIPS machines and the function stack 285
Examining source files 285
Printing source lines 286
Searching source files 287
Specifying source directories 287
Source and machine code 289
June 14, 2012 Contents ix
© 2012, QNX Software Systems Limited
Shared libraries 290
Examining data 291
Expressions 291
Program variables 292
Artificial arrays 293
Output formats 294
Examining memory 295
Automatic display 296
Print settings 298
Value history 303
Convenience variables 304
Registers 305
Floating point hardware 307
Examining the symbol table 307
Altering execution 310
Assignment to variables 310
Continuing at a different address 311
Giving your program a signal 312
Returning from a function 312
Calling program functions 312
Patching programs 313
ARM Memory Management 315 C
ARM-specific restrictions and issues 317
_NTO_TCTL_IO behavior 317
Implications of the ARM Cache Architecture 318
ARM-specific features 320
shm _ ctl() behavior 320
Advanced Qnet Topics 323 D
Low-level discussion of Qnet principles 325
Details of Qnet data communication 326
Node descriptors 327
The <sys/netmgr.h> header file 327
Booting over the network 330
Overview 330
Creating directory and setting up configuration files 330
Building an OS image 331
Booting the client 334
Troubleshooting 334
What are the limitations ... 334
x Contents June 14, 2012
© 2012, QNX Software Systems Limited
Glossary 337
Index 357

标签: QNX 资料 NX 学习

网友评论

发表评论

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

查看所有0条评论>>

小贴士

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

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

关于好例子网

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

;
报警