3 * @author aurelien.morelle@parrot.fr
7 #ifndef _THREAD_INCLUDE_OS_
8 #define _THREAD_INCLUDE_OS_
10 #include <VP_Os/vp_os_types.h>
11 #include <vp_os_thread_dep.h>
15 * Prototype definition of a thread routine.
17 #define DEFINE_THREAD_ROUTINE(NomRoutine,NomParams) THREAD_RET WINAPI thread_##NomRoutine(THREAD_PARAMS NomParams)
21 * Creates and starts a thread.
23 * @param f The thread routine
24 * @param parameters The parameters passed to the thread routine
25 * @param handle The returned handle of the created thread
27 * Variadic parameters : only for eCos
28 * @param sched_info Sechduling priority
29 * @param name Thread name
30 * @param stack_base Stack address
31 * @param stack_size Stack size
32 * @param thread cyg_thread_t object
35 vp_os_thread_create(THREAD_ROUTINE f, THREAD_PARAMS parameters, THREAD_HANDLE *handle, ...);
38 * Waits for a thread to terminate.
40 * @param handle The handle of the thread to wait for the termination
43 vp_os_thread_join(THREAD_HANDLE handle);
46 vp_os_thread_self(void);
49 vp_os_thread_suspend(THREAD_HANDLE handle);
52 vp_os_thread_resume(THREAD_HANDLE handle);
55 vp_os_thread_yield(void);
58 vp_os_thread_priority(THREAD_HANDLE handle, int32_t priority);
60 #endif // ! _THREAD_INCLUDE_OS_