SemysThreadRun

01 The run function of a thread.
02

typedef void (*SemysThreadRun)(HSemysThread thread, void *pParam);

03 Parameters:
  • thread: The thread context for this function.
  • pParam: Arbitrary value that was passed to SemysThreadCreate().
04 This typedef is a placeholder for the actual user code provided thread run function.
05 This function is running in the context of a dedicated thread.
06 Example:
void TestThread(HSemysThread thread, void *pParam)
{
  while (SemysThreadShouldRun(thread))
  {
    printf("Hello World!\n");
    SemysSleepMSec(200);
  }
}
07 Reference: SemysThreading.h
Implementation: Semys Library
See Also: Threading Sub-System, SemysThreadStart(), SemysThreadStop(), SemysThreadShouldRun()

Goto: Main Page; This page is part of the Semys software documentation. See About: Documentation for details.