On 12/07/2018 14:52, Adhemerval Zanella wrote:
On 12/07/2018 13:46, Florian Weimer wrote:
On 02/02/2018 06:04 PM, Adhemerval Zanella wrote:
+int
+thrd_join (thrd_t thr, int *res)
+{
+ void *pthread_res;
+ int err_code = __pthread_join (thr, &pthread_res);
+ if (res)
+ *res = (int)((uintptr_t) pthread_res);
+
+ return thrd_err_map (err_code);
+}
Slight inconsistency with intptr_t above.
Indeed, it seems there is no need to cast.
In fact the cast this construction is still required, since the pthread_join
returned value might have a different size of the expected c11 thrd_join.