logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

hal_create_thread - Create a HAL thread

Arguments

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.

Description

hal_create_thread establishes a realtime thread that will execute one or more HAL functions periodically.

       All thread periods are rounded to integer multiples of the hardware timer period, and the timer period is
       based  on  the  first thread created.  Threads must 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.

       hal_delete_thread deletes a previously created thread.

Name

       hal_create_thread - Create a HAL thread

Realtime Considerations

       Call only from realtime init code, not from other realtime or non-realtime code.

Return Value

       Returns a HAL status code.

See Also

hal_export_funct(3hal)

LinuxCNC Documentation                             2006-10-12                            hal_create_thread(3hal)

Syntax


       int hal_create_thread(const char *name, unsigned long period, int uses_fp)

       int hal_thread_delete(const char *name)

See Also