On Sat, Jun 13, 2009 at 05:59:12PM +0400, Михаил Кипа wrote:
> Next little program:
> #include <pthread.h>
> #include <iostream> 

> int main()
> {
>         pthread_mutexattr_t t;
>         if (pthread_mutexattr_init(&t)) return 1;
>         int i;
>         std::cout << pthread_mutexattr_getprioceiling(&t, &i) << std::endl;
> }

> always print 22. It means that pthread_mutexattr_getprioceiling always
> fails with EINVAL. Under Linux this example works fine, but under
> FreeBSD 7.2 it does`n work. Is it a bug in FreeBSD thread library or
> it ai my misunderstanding?

The priority ceiling is only meaningful with the PTHREAD_PRIO_PROTECT
protocol (pthread_mutexattr_setprotocol()). The FreeBSD threads library
returns EINVAL if you try to get/set the priority ceiling with another
protocol.

-- 
Jilles Tjoelker
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to