This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fwd: threads.h implementation issues


> 3. Cast int->uintptr_t->void*->uintptr_t->int to round-trip the int
>    result via a value of type void*. This assumes that any value of
>    int can be represented in uintptr_t, and that any value of
>    uintptr_t can be represented in void*. I think this is acceptable
>    but others may disagree.

That worked amazingly good, thanks.

> That should be fine, but you need to keep nanosleep out of the
> namespace, so either use __nanosleep (if it exists) or an inline
> syscall.

I thought that nanosleep is part of <time.h> that is automatically
included with threads.h, so there must be no namespace problems. If
there is, please let me know why.

One more question. I made a function named __thrd_err_map, that I use
to match errors between those received by pthread_* functions and is
only used in the definition file (.c), so I'm also including
<errno.h>. Any inconvenience on that?

Thanks for the feedback.

Cheers.

--
Juan Manuel "Lolo" Torres Palma.
Computer Science Student at Universidad de Granada.


-- 
Juan Manuel "Lolo" Torres Palma.
Computer Science Student at Universidad de Granada.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]