SYNOPSIS
loadrt threads name1=name period1=period [fp1=<0|1>] [<_thread-2-info_>] [<_thread-3-info_>]
BESCHREIBUNG
threads is used to create hard realtime threads which can execute HAL functions at specific intervals. It is not a true HAL component, in that it does not export any functions, pins, or parameters of its own. Once it has created one or more threads, the threads stand alone, and the threads component can be unloaded without affecting them. In fact, it can be unloaded and then reloaded to create additional threads, as many times as needed.
threads can create up to three realtime threads. Threads must be created in order, from fastest to slowest. Each thread is specified by three arguments. name1 is used to specify the name of the first thread (thread 1). period1 is used to specify the period of thread 1 in nanoseconds. Both name and period are required. The third argument, fp1 is optional, and is used to specify if thread 1 will be used to execute floating point code. If not specified, it defaults to 1, which means that the thread will support floating point. Specify 0 to disable floating point support, which saves a small amount of execution time by not saving the FPU context. For additional threads, name2, period2, fp2, name3, period3, and fp3 work exactly the same. If more than three threads are needed, unload threads, then reload it to create more threads.
FUNKTIONEN
Keine
PINS
Keine
PARAMETER
Keine
BUGS
Die Existenz von threads könnte als Fehler angesehen werden. Idealerweise würde das Erzeugen und Löschen von Threads direkt mit halcmd-Befehlen erfolgen, wie "*newthread * name period", "*delthread * name" oder ähnlich. Aufgrund der Beschränkungen in der aktuellen HAL-Implementierung muss die Erstellung von Threads jedoch im Kernelspace erfolgen, und das Laden einer Komponente ist der einfachste Weg, dies zu tun.