Ignoring for a moment the elephant in the corner of the Apple deprecated (and non-functional) sem_* functions, the *ix versions of the semaphore functions are really sort of broken.
For the event semaphores, one of the functions is a reset, which uses sem_init() to perform the reset. This probably doesn't work (or at least, is not guaranteed to work) because the documentation states that using sem_init() on an existing semaphore handle is undefined. The interpreter code uses the SysSemaphore class which implements all of the desired behavior, but since it uses pthread, it only works for the unnamed case. It would not be a huge effort to dual path named vs. unnamed, but the sem_init() problems still exist for the named case. There are similar problems with the Mutex functions. These are implemented using the same semaphore functions so a lot of the same issues exist. Also, I'm not convinced that what is implemented here is a true mutex function. Again, the classes implemented in SysSemaphore can be used here, but only for the unnamed cases. I have not been able to find any equivalent to windows named mutex semaphores in the linux world. In summary, fixing the unnamed versions of these would be a fairly simple thing, fixing the named versions, I have no solutions. Rick
_______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel