Syntax
VM_THREAD_HANDLE vm_thread_create(
    vm_thread_callback callback, 
    void* user_data, 
    VM_THREAD_PRIORITY priority
);
ContentsIndex
PreviousUpNext
vm_thread_create
Syntax
VM_THREAD_HANDLE vm_thread_create(
    vm_thread_callback callback, 
    void* user_data, 
    VM_THREAD_PRIORITY priority
);
Description

Creates a thread. Limited by the system, vm_thread_create() can only create up to 10 threads. The caller of this function needs to pass the expected priority to the create. The value 1 indicates the highest priority, while the 255 is the lowest. The actual thread priority will be assigned by the system according to the following rule. 

 

  1. If the expected priority is equal or less than 128, the actual priority

assigned by the system will be higher than the main thread.

  1. If the expected priority is equal or greater than 129, the actual thread

priority assigned by the system will be lower than the main thread.

  1. If the expected priority is 0, the system will assign the default priority

to the thread, which is lower than the priority of the main thread.

Parameters
Parameters 
Description 
vm_thread_callback callback 
[IN] The callback function to be executed by the newly created thread. 
void* user_data 
[IN] The data to be consumed by the callback function, such as parameters. 
VM_THREAD_PRIORITY priority 
[IN] The expected thread priority for the newly created thread. 
Returns

The handle of the newly created thread.

File

vmthread.h

Group
Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.