views:

144

answers:

1

Hello

If you don't know what is futex and linuxthreads-0.9, please, don't reply.

Can I mix in one program futex-based mutex with mutex from linuxthreads-0.8 or -0.9 (which was used in all glibc <=2.2 and in all uClibc) ?

I need interprocess mutex (pshared one, PTHREAD_PROCESS_SHARED).

So, If threads are started and managed by linuxthreads pthread_manager, will it be confused by futex-based sleep and wake?

Can I use futex-based mutexes both for inter-process and inter-thread synchronization?

+2  A: 

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.

Zan Lynx
Will pthread_cancel with asynchronous flag work?
osgx
@osgx: Heck if I know. I don't know of anyone who has actually tried building such a weird combination of code.
Zan Lynx