@@ -101,7 +101,7 @@ typedef u32 lwpq_t;
101101\param[in] stack_size size of the provided stack. If 0, the default STACKSIZE of 8Kb is taken.
102102\param[in] prio priority on which the newly created thread runs.
103103
104- \return 0 on success, <0 on error
104+ \return 0 on success, non-zero on error
105105*/
106106s32 LWP_CreateThread (lwp_t * thethread ,void * (* entry )(void * ),void * arg ,void * stackbase ,u32 stack_size ,u8 prio );
107107
@@ -110,7 +110,7 @@ s32 LWP_CreateThread(lwp_t *thethread,void* (*entry)(void *),void *arg,void *sta
110110\brief Suspend the given thread.
111111\param[in] thethread handle to the thread context which should be suspended.
112112
113- \return 0 on success, <0 on error
113+ \return 0 on success, non-zero on error
114114*/
115115s32 LWP_SuspendThread (lwp_t thethread );
116116
@@ -119,7 +119,7 @@ s32 LWP_SuspendThread(lwp_t thethread);
119119\brief Resume the given thread.
120120\param[in] thethread handle to the thread context which should be resumed.
121121
122- \return 0 on success, <0 on error
122+ \return 0 on success, non-zero on error
123123*/
124124s32 LWP_ResumeThread (lwp_t thethread );
125125
@@ -145,7 +145,7 @@ lwp_t LWP_GetSelf(void);
145145\brief Get the priority of the given thread.
146146\param[in] thethread handle to the thread context whos priority should be returned. If NULL, the current thread will be taken.
147147
148- \return 0 on success, <0 on error
148+ \return current thread priority
149149*/
150150s32 LWP_GetThreadPriority (lwp_t thethread );
151151
@@ -155,9 +155,9 @@ s32 LWP_GetThreadPriority(lwp_t thethread);
155155\param[in] thethread handle to the thread context whos priority should be changed. If NULL, the current thread will be taken.
156156\param[in] prio new priority to set
157157
158- \return none
158+ \return old thread priority
159159*/
160- void LWP_SetThreadPriority (lwp_t thethread ,u32 prio );
160+ s32 LWP_SetThreadPriority (lwp_t thethread ,u32 prio );
161161
162162
163163/*! \fn void LWP_YieldThread(void)
@@ -182,7 +182,7 @@ void LWP_Reschedule(u32 prio);
182182\param[in] thethread handle to the thread's context which should be joined to wait on termination.
183183\param[in] value_ptr pointer-pointer to a variable to receive the return code of the terminated thread.
184184
185- \return 0 on success, <0 on error
185+ \return 0 on success, non-zero on error
186186*/
187187s32 LWP_JoinThread (lwp_t thethread ,void * * value_ptr );
188188
@@ -191,7 +191,7 @@ s32 LWP_JoinThread(lwp_t thethread,void **value_ptr);
191191\brief Initialize the thread synchronization queue
192192\param[in] thequeue pointer to a lwpq_t handle.
193193
194- \return 0 on success, <0 on error
194+ \return 0 on success, non-zero on error
195195*/
196196s32 LWP_InitQueue (lwpq_t * thequeue );
197197
@@ -200,16 +200,16 @@ s32 LWP_InitQueue(lwpq_t *thequeue);
200200\brief Close the thread synchronization queue and releas the handle
201201\param[in] thequeue handle to the thread's synchronization queue
202202
203- \return none
203+ \return 0 on success, non-zero on error
204204*/
205- void LWP_CloseQueue (lwpq_t thequeue );
205+ s32 LWP_CloseQueue (lwpq_t thequeue );
206206
207207
208208/*! \fn s32 LWP_ThreadSleep(lwpq_t thequeue)
209209\brief Pushes the current thread onto the given thread synchronization queue and sets the thread state to blocked.
210210\param[in] thequeue handle to the thread's synchronization queue to push the thread on
211211
212- \return 0 on success, <0 on error
212+ \return 0 on success, non-zero on error
213213*/
214214s32 LWP_ThreadSleep (lwpq_t thequeue );
215215
@@ -219,7 +219,7 @@ s32 LWP_ThreadSleep(lwpq_t thequeue);
219219\param[in] thequeue handle to the thread's synchronization queue to push the thread on
220220\param[in] reltime pointer to a timespec structure holding the relative time for the timeout.
221221
222- \return 0 on success, <0 on error
222+ \return 0 on success, non-zero on error
223223*/
224224s32 LWP_ThreadTimedSleep (lwpq_t thequeue ,const struct timespec * reltime );
225225
@@ -228,18 +228,18 @@ s32 LWP_ThreadTimedSleep(lwpq_t thequeue,const struct timespec *reltime);
228228\brief Signals one thread to be revmoved from the thread synchronization queue and sets it back to running state.
229229\param[in] thequeue handle to the thread's synchronization queue to pop the blocked thread off
230230
231- \return none
231+ \return 0 on success, non-zero on error
232232*/
233- void LWP_ThreadSignal (lwpq_t thequeue );
233+ s32 LWP_ThreadSignal (lwpq_t thequeue );
234234
235235
236236/*! \fn void LWP_ThreadBroadcast(lwpq_t thequeue)
237237\brief Removes all blocked threads from the thread synchronization queue and sets them back to running state.
238238\param[in] thequeue handle to the thread's synchronization queue to pop the blocked threads off
239239
240- \return none
240+ \return 0 on success, non-zero on error
241241*/
242- void LWP_ThreadBroadcast (lwpq_t thequeue );
242+ s32 LWP_ThreadBroadcast (lwpq_t thequeue );
243243
244244#ifdef __cplusplus
245245 }
0 commit comments