Boost logo

Boost Users :

From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2008-01-28 11:37:47


Szilard Pataki escribió:
> Hello Ion,
>
> I would like to use the interprocess library and some NPTL features
> (pthread_setaffinity_np => assign a thread to a cpu) at the same time. The
> pthread_setaffinity_np function is declared in /usr/include/nptl/pthread.h
> (on my developer platform), but throughout the interprocess/boost headers I
> can find
>
> #include <pthread.h>
>
> ... which makes me think that /usr/include/pthread.h is included. Can I
> simply swap in the interprocess .hpp files the include statements to this:
>
> #include <nptl/pthread.h>
>
> ... or do you know of a cleaner solution?

 From your words I guess that <pthread.h> and <ntpl/pthread.h> are
incompatible and you can only include one of them (maybe each one refer
to a different pthread implementation)?

If so, you could just add the "/usr/include/nptl/" to the front of your
include directories (-I option in gcc) so that

#include <pthread.h>

includes ntpl/pthread.h instead of pthread.h. That supposing
ntpl/pthread.h has all the needed pthread declarations (since NTPL is an
implementation of pthread, I suppose that should be true) used by
Interprocess. Or am I missing something?

Regards,

Ion


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net