david singleton | 15 Feb 2006 19:29

Re: pthread_mutex_init returns EVINAL


On Feb 14, 2006, at 11:59 AM, Noah Watkins wrote:

> I am running 2.6.15-rt16. I am trying to run the robust1-mode2.c test 
> from the posix test suite 
> (posixtest/posixtestsuite/functional/threads/robust_test). It fails 
> during the call to pthread_mutex_init when the futex syscall for 
> FUTEX_REGISTER is made. EINVAL is returned in futex_register when
>
> this test fails:
>
> if (vma->vm_file && vma->vm_file->f_mapping)
>
> I am trying to get started with some simple examples but am stuck at 
> this point.

Noah,
	you'll have to allocate the pthread_mutex via mmap of some ANONYMOUS 
memory.
Currently robustness is only supported for pthread mutexes that are 
shared and backed
by a file mapping, either an mmapped file two processes share or some 
mmapped ANONYMOUS
memory for pthreads inside a process.

David

>
> - Noah
> _______________________________________________
> robustmutexes mailing list
> robustmutexes <at> lists.osdl.org
> https://lists.osdl.org/mailman/listinfo/robustmutexes


On Feb 14, 2006, at 11:59 AM, Noah Watkins wrote:

> I am running 2.6.15-rt16. I am trying to run the robust1-mode2.c test 
> from the posix test suite 
> (posixtest/posixtestsuite/functional/threads/robust_test). It fails 
> during the call to pthread_mutex_init when the futex syscall for 
> FUTEX_REGISTER is made. EINVAL is returned in futex_register when
>
> this test fails:
>
> if (vma->vm_file && vma->vm_file->f_mapping)
>
> I am trying to get started with some simple examples but am stuck at 
> this point.

Noah,
	you'll have to allocate the pthread_mutex via mmap of some ANONYMOUS 
memory.
Currently robustness is only supported for pthread mutexes that are 
shared and backed
by a file mapping, either an mmapped file two processes share or some 
mmapped ANONYMOUS
memory for pthreads inside a process.

David

>
> - Noah
> _______________________________________________
> robustmutexes mailing list
> robustmutexes <at> lists.osdl.org
> https://lists.osdl.org/mailman/listinfo/robustmutexes


Gmane