All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Vlasov <vsu@altlinux.ru>
To: Chris Friesen <cfriesen@nortel.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: proper API for sched_setaffinity ?
Date: Wed, 25 May 2005 22:33:27 +0400	[thread overview]
Message-ID: <20050525223327.511ee381.vsu@altlinux.ru> (raw)
In-Reply-To: <4294BAD8.4030300@nortel.com>

[-- Attachment #1: Type: text/plain, Size: 1237 bytes --]

On Wed, 25 May 2005 11:50:16 -0600 Chris Friesen wrote:

> On my system (Mandrake 10.0) the man page for sched_setaffinity() lists 
> the prototype as:
> 
> int  sched_setaffinity(pid_t  pid,  unsigned  int  len,  unsigned  long
>         *mask);
> 
> 
> But /usr/include/sched.h gives it as
> 
> extern int sched_setaffinity (__pid_t __pid, __const cpu_set_t *__mask)
> 
> Which is correct?

Here "man sched_setaffinity" says:

HISTORY
       The affinity syscalls were  introduced  in  Linux  kernel  2.5.8.   The
       library  calls  were  introduced  in  glibc 2.3, and are still in glibc
       2.3.2. Later glibc 2.3.2 development versions changed this interface to
       one without the len field, and still later versions reverted again. The
       glibc prototype is now

       /* Set the CPU affinity for a task */
       extern int sched_setaffinity (pid_t pid, size_t cpusetsize,
                                     const cpu_set_t *cpuset);

       /* Get the CPU affinity for a task */
       extern int sched_getaffinity (pid_t pid, size_t cpusetsize,
                                     cpu_set_t *cpuset);

So looks like you have a version of glibc with a broken interface (and
2.3.5 here has correct prototypes).

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2005-05-25 18:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-25 17:50 proper API for sched_setaffinity ? Chris Friesen
2005-05-25 18:26 ` Christoph Hellwig
2005-05-25 18:33 ` Sergey Vlasov [this message]
2005-05-26  9:02 ` P

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050525223327.511ee381.vsu@altlinux.ru \
    --to=vsu@altlinux.ru \
    --cc=cfriesen@nortel.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.