LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] sched_setaffinity interface change

[ILUG] sched_setaffinity interface change

Dave Airlie airlied at csn.ul.ie
Fri Nov 5 00:40:22 GMT 2004


At a guess the old interfaces are broken with new kernels and may not work
in old kernels... you might be better of using the kernel syscall directly
if it isn't a big deal..

Dave.

On Thu, 4 Nov 2004 P at draigBrady.com wrote:

> As can be seen here:
> http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/posix/sched.h?cvsroot=glibc
> the sched_setaffinity() interface has changed 3 times:
>
> rh9 = glibc-2.3.2 = int sched_setaffinity(__pid_t __pid, unsigned int __len,
> unsigned long int *__mask);
> fc1 = glibc-2.3.3 = int sched_setaffinity(__pid_t __pid, __const cpu_set_t
> *__mask);
> fc2 = glibc-cvs   = int sched_setaffinity(__pid_t __pid, size_t __cpusetsize,
> __const cpu_set_t *__cpuset);
>
> Now I would like to write code that can handle all of these
> and was wondering whether I could use conditional
> compilation, rather than a configure script.
>
> What I've come up with so far is:
>
> #ifdef CPU_SET
>     //use glibc-2.3.2 interface
> #else
>     //any clever way to select between the last 2?
> #endif
>
> Please don't say I need a configure script to get
> a program to compile on both fc1 and fc2?
>
> thanks,
> Pádraig.
>

-- 
David Airlie, Software Engineer
http://www.skynet.ie/~airlied / airlied at skynet.ie
pam_smb / Linux DECstation / Linux VAX / ILUG person




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell