From owner-freebsd-hackers Tue Dec 1 15:37:59 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA04282 for freebsd-hackers-outgoing; Tue, 1 Dec 1998 15:37:59 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from thelab.hub.org (nat1001.mpoweredpc.net [142.177.191.239]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA04272 for ; Tue, 1 Dec 1998 15:37:55 -0800 (PST) (envelope-from scrappy@hub.org) Received: from localhost (scrappy@localhost) by thelab.hub.org (8.9.1/8.9.1) with ESMTP id TAA00923 for ; Tue, 1 Dec 1998 19:37:42 -0400 (AST) (envelope-from scrappy@hub.org) X-Authentication-Warning: thelab.hub.org: scrappy owned process doing -bs Date: Tue, 1 Dec 1998 19:37:41 -0400 (AST) From: The Hermit Hacker To: freebsd-hackers@FreeBSD.ORG Subject: pthread_cancel() function... Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I'm working on getting acapd compiled under FreeBSD, and have hit a snag. It uses pthread_cancel(): ============================= /* * At this point, current_thread should point to the pthread_t which * would've contained the id of the thread we failed to create. */ for (cleanup_thread = (*queue)->thread_ids + concurrency - 1; current_thread < cleanup_thread; cleanup_thread--) pthread_cancel(*cleanup_thread); /* Now that they're all canceled, we wait for them to finish. */ for (cleanup_thread = (*queue)->thread_ids + concurrency; current_thread < cleanup_thread; cleanup_thread--) pthread_join(*cleanup_thread, &status); /* * Now that they're all finished and not accessing our queue, we can get * on with mopping things up... */ } ============================= The closest I can find is pthread_detach(), but according to the man page for pthread_cancel under Solaris, tehy aren't quite the same... Anyone with experience with this that can comment? Thanks.. Marc G. Fournier Systems Administrator @ hub.org primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message