site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com I'm investigating reworking some code to use: The missing bits are: -tim _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... I've seen this question go by a few times, but I don't think I've seen an answer, or at least I can't find it in the archives. - shm_open for a database in a target process mappable by one or more clients - sem_open for the target to notify all clients of changes (each client would need a thread waiting on the semaphore) - a multi-process lock that has a _timed wait_ option - some details on how to ensure that database "commits" to the shared memory will be atomic wrt the locking - Does msync() have any benefit over PPC sync before unlock, isync after lock + whatever for Intel (it's been a few years... :) Reviewing the Darwin 8.1 source, pthread_mutexattr_setpshared is still not allowing for shared mutexes. Mach lock_set's don't seem to have a timed wait. About the only suggestion that seems likely to work is Chris Kane's from 4 years ago (ancient history!) <http://lists.apple.com/ archives/darwin-development/2001/Mar/msg00372.html> (lwarx/stwcx + semaphore + coding... bleah). I can obviously implement my own timed-wait lock on top of the primitives, but I'd rather not have to write & debug the code myself. My needs are for very low latency locking in the target process, so maybe I _should_ just implement my own... This email sent to site_archiver@lists.apple.com