On Fri, Aug 27, 2004, Rafael Ávila de Espíndola wrote:

> I am trying to install pth in a stand alone directory and switch between
> linuxthreads and pth by adding -L and -I option to gcc. In doing so I found
> that the signature for pthread_attr_setschedparam is different between
> linuxthread and pth.
>
> In pth it is
>
> extern int       pthread_attr_setschedparam(pthread_attr_t *, struct
> sched_param *);
>
> and in linuxthread it is
>
> extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
>                                        __const struct sched_param *__restrict
>                                        __param) __THROW;
>
> Adding a const in the sched_param argument solves the problem.

Ops, good catch. Yes, SUSv2 and SUSv3 use "const struct sched_param *"
here, so LinuxThreads is right and GNU Pth was wrong here. I've fixed
this now for GNU Pth 2.0.2. Thanks for your feedback.

                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com

______________________________________________________________________
GNU Portable Threads (Pth)            http://www.gnu.org/software/pth/
Development Site                      http://www.ossp.org/pkg/lib/pth/
Distribution Files                          ftp://ftp.gnu.org/gnu/pth/
Distribution Snapshots                 ftp://ftp.ossp.org/pkg/lib/pth/
User Support Mailing List                            [EMAIL PROTECTED]
Automated List Manager (Majordomo)           [EMAIL PROTECTED]

Reply via email to