[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [Linux-cluster] [PATCH] Get rid of non portable _syscall0
- From: Lon Hohberger <lhh redhat com>
- To: adconrad ubuntu com
- Cc: Jeff Bailey <jbailey ubuntu com>, linux clustering <linux-cluster redhat com>
- Subject: Re: [Linux-cluster] [PATCH] Get rid of non portable _syscall0
- Date: Fri, 10 Jun 2005 13:10:17 -0400
On Sat, 2005-06-11 at 02:37 +1000, Adam Conrad wrote:
> Lon Hohberger wrote:
> >
> > 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?
>
> I threw -ENOSYS in mostly as a sanity check. If the suite is meant to be
> portable to other POSIX systems, you'll certainly want to do something
> else if gettid() doesn't exist, since it's linux-specific.
Well, linux-cluster is, um, rather linux-specific. ;)
Ok, so, I'll add a #warn and return pthread_self() for now - since it
also doesn't fail and returns a thread-specific identifier (which is the
primary reason we used gettid()...).
> The only aim
> of the patch was to shoot for portability accross all Linux platforms
> (many of which don't have _syscall magic macros, and word on the street is
> that we may not have them on any arches in the future).
That can only be a good thing.
-- Lon
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]