From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 15 04:14:30 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B05A16A4CE for ; Tue, 15 Mar 2005 04:14:30 +0000 (GMT) Received: from vms040pub.verizon.net (vms040pub.verizon.net [206.46.252.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5CDCA43D5D for ; Tue, 15 Mar 2005 04:14:30 +0000 (GMT) (envelope-from ringworm01@gmail.com) Received: from ringworm.mechee.com ([4.27.46.32])0.04 <0IDD00CGKL45Q2L1@vms040.mailsrvcs.net> for freebsd-hackers@freebsd.org; Mon, 14 Mar 2005 22:14:29 -0600 (CST) Received: by ringworm.mechee.com (Postfix, from userid 1001) id 316E82CE75B; Mon, 14 Mar 2005 20:14:29 -0800 (PST) Date: Mon, 14 Mar 2005 20:14:28 -0800 From: "Michael C. Shultz" To: freebsd-hackers@freebsd.org Message-id: <200503142014.28897.ringworm01@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit Content-disposition: inline User-Agent: KMail/1.7.2 Subject: threads question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Mar 2005 04:14:30 -0000 Hi, I've just reached a point in a program I'm writing where I'd like to do threading. When I try to start a thread like this: pthread_create(&thread, &attr, MGPMrUpgrade, property ); where property is a structure of many variables it doesn't get passed to the function. If I do this: pthread_create(&thread, &attr, MGPMrUpgrade( &property ), NULL ); It works, but just seems wrong. Can anyone point me to a source file, preferably in /usr/src somewhere that passes a structure to a function being run as a thread so I may study the proper way to do this? Thank you. -Mike