Pergunta

Se você não sabe o que é Futex e LinuxThreads-0.9, por favor, não responda.

Posso misturar um mutex baseado em Futex com um programa com mutex de LinuxThreads-0.8 ou -0.9 (que foi usado em todos os glibc <= 2,2 e em todo o UCLIBC)?

Preciso de interprocessos mutex (pShared One, pthread_process_shared).

Então, se os threads forem iniciados e gerenciados pelo LinuxThreads pthread_manager, ele será confuso com o sono e o wake baseados em Futex?

Posso usar mutexes baseados em Futex para sincronização entre processos e interesses?

Foi útil?

Solução

I don't see why you couldn't.

You will not be able to use pthreads, obviously. You will probably be using the pthread library with the old mutexes and you will need to have the futex code in some other library.

You obviously cannot lock a linuxthreads mutex and unlock it with a futex function, that would never work.

But if one thread is blocked in the kernel waiting on a futex, I do not see how it's any different than being blocked on a disk I/O operation, and linuxthreads handles that well enough.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top