[Linux-cluster] [PATCH] Get rid of non portable _syscall0
Lon Hohberger
lhh at redhat.com
Fri Jun 10 16:04:56 UTC 2005
On Fri, 2005-06-10 at 11:31 +0200, Fabio Massimo Di Nitto wrote:
> Hi guys,
> while building the suite on ia64 I found out that _syscall0 is not available on all Linux supported
> arched and as far as i understood the overall _syscall$magicnumber will disappear.
>
> Jeff in CC can probably give a much more detailed explanation if needed.
>
> Adam in CC cooked up a patch (in attachment) to make the code portable.
gettid is not a syscall which fails. From the gettid(2):
--------------
RETURN VALUE
On success, returns the thread ID of the current process.
ERRORS
This call is always successful.
--------------
Similarly, the code is written to rely on the documented behavior. So,
when it's not available, maybe the wrapper should return
(pid_t)pthread_self() instead of -ENOSYS?
-- Lon
More information about the Linux-cluster
mailing list