📄 threads.9
字号:
.TH THREADS "9" "2007-01-16" "EMC Documentation" "HAL Component".de TQ.br.ns.TP \\$1...SH NAMEthreads \- creates hard realtime HAL threads.SH SYNOPSIS\fBloadrt threads name1=\fIname\fB period1=\fIperiod\fR [\fBfp1=\fR<\fB0\fR|\fB1\fR>] [<thread-2-info>] [<thread-3-info>].SH DESCRIPTION\fBthreads\fR is used to create hard realtime threads which can executeHAL functions at specific intervals. It is not a true HAL component, inthat it does not export any functions, pins, or parameters of its own.Once it has created one or more threads, the threads stand alone, andthe \fBthreads\fR component can be unloaded without affecting them. Infact, it can be unloaded and then reloaded to create additional threads,as many times as needed..P\fBthreads\fR can create up to three realtime threads. Threads must becreated in order, from fastest to slowest. Each thread is specified bythree arguments. \fBname1\fR is used to specify the name of the firstthread (thread 1). \fBperiod1\fR is used to specify the period of thread1 in nanoseconds. Both \fIname\fR and \fIperiod\fR are required. The third argument, \fBfp1\fR is optional, and is used to specify if thread1 will be used to execute floating point code. If not specified, itdefaults to \fB1\fR, which means that the thread will support floatingpoint. Specify \fB0\fR to disable floating point support, which savesa small amount of execution time by not saving the FPU context. Foradditional threads, \fBname2\fR, \fBperiod2\fR, \fBfp2\fR, \fBname3\fR,\fBperiod3\fR, and \fBfp3\fR work exactly the same. If more than threethreads are needed, unload threads, then reload it to create more threads..SH FUNCTIONS.PNone.SH PINS.PNone.SH PARAMETERS.PNone.SH BUGS.PThe existence of \fBthreads\fR might be considered a bug. Ideally, creationand deletion of threads would be done directly with \fBhalcmd\fR commands,such as "\fBnewthread \fIname period\fR", "\fBdelthread \fIname\fR", or similar.However, limitations in the current HAL implementation require thread creationto take place in kernel space, and loading a component is the most straightforwardway to do that.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -