hal_create_thread.3hal

来自「CNC 的开放码,EMC2 V2.2.8版」· 3HAL 代码 · 共 44 行

3HAL
44
字号
.TH hal_create_thread "3hal" "2006-10-12" "EMC Documentation" "HAL".SH NAMEhal_create_thread \- Create a HAL thread.SH SYNTAX.HPint hal_create_thread(char *\fIname\fR, unsigned long \fIperiod\fR, int \fIuses_fp\fR).HPint hal_thread_delete(char *\fIname\fR).SH  ARGUMENTS.IP \fIname\fRThe name of the thread.IP \fIperiod\fRThe interval, in nanoseconds, between iterations of the thread.IP \fIuses_fp\fRMust be nonzero if a function which uses floating-point will be attachedto this thread..SH DESCRIPTION\fBhal_create_thread\fR establishes a realtime thread that willexecute one or more HAL functions periodically.All thread periods are rounded to integer multiples of the hardware timerperiod, and the timer period is based on the first thread created.  Threadsmust be created in order, from the fastest to the slowest.  HAL assignsdecreasing priorities to threads that are created later, so creating themfrom fastest to slowest results in rate monotonic priority scheduling.\fBhal_delete_thread\fR deletes a previously created thread..SH REALTIME CONSIDERATIONSCall only from realtime init code, not from user space or realtime code..SH RETURN VALUEReturns a HAL status code..SH SEE ALSO\fBhal_export_funct(3hal)\fR

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?