site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Am 19.01.2005 um 19:42 schrieb Nat!: Ciao Nat! ------------------------------------------------------ As an ex-Atari employee, who has known both high income and protracted unemployment, I can assure you that nobody should enter programming for the money. - Chris Crawford _______________________________________________ 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'd like to do the following. In my library code I want to get a list of all threads of my process and the thread I am currently in myself (pthread_this()). What I then want to do is suspend all the other threads, do a little processing and then resume all the other threads. The general idea is something akin to a "full garbage collection". The effect would be a process-wide mutex without the mutex. Well the replies I got privately say, that you can't do that in Darwin. You can probably get the lists of threads, but the suspension of a related thread in the same process is not supported. That wraps up this mail thread. As I have just a little time on my hand, I'd like to add the following musings for posterity :) There appear to be some pthread extensions (sorry I lost the links), which go in the direction I need, but they wouldn't work either, since you can't truely nest the suspension calls. To get my scenario to work, it would have to be necessary to be able to suspend and resume a thread multiple times (using a counter). I would have to suspend a thread, that already might be suspended, because I can't be sure, this thread wouldn't unsuspend itself - maybe acquiring a kernel resource -, while I want to do work behind its back. Obviously real-time threads would be cranky, if I suspended them, but that's OK, for in my code, I don't have to worry about and deal with thread priorities. This email sent to site_archiver@lists.apple.com