include/threads: Prevent operator precedence issues
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
This commit is contained in:
parent
b628d92e63
commit
270e9196c6
@ -106,14 +106,14 @@ typedef CODE void (*tss_dtor_t)(FAR void *);
|
||||
*/
|
||||
|
||||
#define thrd_create(thr,func,arg) \
|
||||
pthread_create(thr,NULL,(pthread_startroutine_t)func,arg)
|
||||
pthread_create(thr,NULL,(pthread_startroutine_t)(func),arg)
|
||||
|
||||
/* thrd_equal: checks if two identifiers refer to the same thread
|
||||
*
|
||||
* int thrd_equal(thrd_t lhs, thrd_t rhs);
|
||||
*/
|
||||
|
||||
#define thrd_equal(lhs,rhs) (lhs == rhs)
|
||||
#define thrd_equal(lhs,rhs) ((lhs) == (rhs))
|
||||
|
||||
/* thrd_current: obtains the current thread identifier
|
||||
*
|
||||
@ -143,7 +143,7 @@ typedef CODE void (*tss_dtor_t)(FAR void *);
|
||||
* _Noreturn void thrd_exit(int res);
|
||||
*/
|
||||
|
||||
#define thrd_exit(res) pthread_exit((pthread_addr_t)res)
|
||||
#define thrd_exit(res) pthread_exit((pthread_addr_t)(res))
|
||||
|
||||
/* thrd_detach: detaches a thread
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user