how to set mutex can be shared between different process.

by waterblood » Tue, 03 Mar 2009 08:27:18 GMT


Sponsored Links
 Hi All,

   Usually we use  pthread_mutexattr_setpshared to share different
mutex with different process. But I have checked the bionic libc
implementation. It only support PTHREAD_PROCESS_PRIVATE setting.
Does it mean android does not support mutex shared between different
processes?

pthread.c in android/bionic/libc/bionic

772 int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int
pshared)
 773 {
 774     if (!attr)
 775         return EINVAL;
 776
 777     return (pshared == PTHREAD_PROCESS_PRIVATE) ? 0 : ENOTSUP;
 778 }


Thanks
Guoyin Chen
--~--~---------~--~----~------------~-------~--~----~



how to set mutex can be shared between different process.

by Freepine » Wed, 04 Mar 2009 13:58:29 GMT


 Perhaps you can try to use a semaphore file instead?





--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


how to set mutex can be shared between different process.

by Dave Sparks » Thu, 05 Mar 2009 07:44:17 GMT


 What is the use case for a shared mutex?

We use shared mutex for IPC shared process memory. See AudioTrack/
AudioFlinger for sample code. In the case, the sharing works because
the mutex is in the shared memory and both process have access to it.



--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. OOT : Sepenggal Kisah Android

Dari dulu, saya sangat senang dengan tulisannya Kang Lucky Sebastian. Saat
komparasi Android dan BB dalam tulisan terdahulu, saya baru punya BB.
Selesai baca tulisan itu, saya langsung ubek-ubek K*sk*s untuk cari orang
yang jual Android (dan dapat Spica). Sekarang, ada tulisan beliau tentang
Android. Kali ini disandingkan dengan aipong. Mungkin beberapa rekan yang
ikut milis tetangga (g***rade) sudah pernah membacanya. Bagi Rekan yang
ingin membaca kembali, silakan buka link dibawah.

http://mreunion.wordpress.com/2010/10/23/sepenggal-kisah-android/

No offense. Android mesti punya 'sparing partner' agar terus berkembang.

Salam,

Andri Fitriyadi

-- 
===============
"

2. Mohon Petunjuk Unlock Samsung Galaxy T mobile

Dear Member Android

Salam kenal, saya baru dapat Samsung galaxy from UK ada tulisan Tmobile 

Kiriman dari saudara di luar sana, tapi ternyata ada Network SIM Unlock PIN

ada yang bisa bantu ?  

thanks


herry 

 

__________ Information from ESET Smart Security, version of virus signature
database 5740 (20101228) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 

-- 
===============
"

3. EditText in Header of ListView loses focus after first character is entered

4. Froyo Official buat Juned, akan-kah ?

5. Froyo Official for HTC Wildfire

6. z4root di Nexian Journey

7. Help with RIL