Jan Kiszka wrote: > Gilles Chanteperdrix wrote: >> Jan Kiszka wrote: >>> Hi, >>> >>> what is the policy for the user space handles the native skin generates: >>> Can the user share them between processes via putting them into shared >>> memory (like it is allowed for some POSIX objects)? >>> >>> I'm wondering if I have to use the POSIX pattern to resolve the address >>> of a fast mutex: If shared, look to global heap, otherwise use >>> process-local heap. >> The posix skin does only this only the first time. If the address is >> local, it is computed and stored locally and never recomputed again. > > What remains is "if (shadow->attr.pshared) ...", so a condition + some > bit in the shadow data structure. > > I could merged that bit into the lowest bit of the lock pointer, OK, but > would still have to check for it. If native defines that a handle is > only valid within the process that obtained it, I could skip that dance > altogether.
Ok. I understand what you mean. I wanted to work this around for the POSIX API, but let us consider a real-life fact: the process-shared objects are a corner-case. So, let us not spend too much sweat on it. -- Gilles. _______________________________________________ Xenomai-core mailing list Xenomai-core@gna.org https://mail.gna.org/listinfo/xenomai-core