hal_create_thread − Create a HAL thread |
int hal_create_thread(char *name, unsigned long period, int uses_fp) |
int hal_thread_delete(char *name) |
name |
The name of the thread |
||
period |
The interval, in nanoseconds, between iterations of the thread |
uses_fp |
Must be nonzero if a function which uses floating-point will be attached to this thread. |
hal_create_thread establishes a realtime thread that will execute one or more HAL functions periodically. All threads must run at an integer multiple of the fastest thread, and the fastest thread must be created first. In general, threads should be created in order, from the fastest to the slowest. HAL assigns decreasing priorities to threads that are created later, so creating them from fastest to slowest results in rate monotonic priority scheduling, usually a good thing. hal_delete_thread deletes a previously created thread. |
Call only from realtime init code, not from user space or realtime code. |
Returns a HAL status code. |
hal_export_funct(3hal) |