ZenWINX Logo ZenWINX

Architecture - Reference Manual - Guides

Threads

Functions

int __stdcall winx_create_thread (PTHREAD_START_ROUTINE start_addr, PVOID parameter, HANDLE *phandle)
 Creates a thread and starts them.
void __stdcall winx_exit_thread (void)
 Terminates the current thread.

Function Documentation

int __stdcall winx_create_thread ( PTHREAD_START_ROUTINE  start_addr,
PVOID  parameter,
HANDLE *  phandle 
)

Creates a thread and starts them.

Parameters:
[in] start_addr the starting address of the thread.
[in] parameter pointer to data passed to thread routine.
[out] phandle the thread handle pointer. May be NULL.
Returns:
Zero for success, negative value otherwise.
Note:
Look at the following example for the thread function prototype.
Example:
 DWORD WINAPI thread_proc(LPVOID parameter)
 {
     // do something
     winx_exit_thread();
     return 0;
 }
 winx_create_thread(thread_proc,NULL);

Definition at line 49 of file thread.c.

void __stdcall winx_exit_thread ( void   ) 

Terminates the current thread.

The exit code is always zero.

Todo:
Add exit code parameter.

Definition at line 79 of file thread.c.


Generated on Sat May 29 23:06:45 2010 for ZenWINX by doxygen 1.6.2