From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29612 invoked by alias); 12 Jul 2012 21:19:08 -0000 Received: (qmail 29604 invoked by uid 22791); 12 Jul 2012 21:19:07 -0000 X-SWARE-Spam-Status: No, hits=-5.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-bk0-f43.google.com (HELO mail-bk0-f43.google.com) (209.85.214.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 12 Jul 2012 21:18:55 +0000 Received: by bkty15 with SMTP id y15so2318977bkt.2 for ; Thu, 12 Jul 2012 14:18:54 -0700 (PDT) Received: by 10.204.0.77 with SMTP id 13mr10263500bka.128.1342127933908; Thu, 12 Jul 2012 14:18:53 -0700 (PDT) Received: from [192.168.2.195] (93-33-97-84.ip44.fastwebnet.it. [93.33.97.84]) by mx.google.com with ESMTPS id y20sm3772734bkv.11.2012.07.12.14.18.53 (version=SSLv3 cipher=OTHER); Thu, 12 Jul 2012 14:18:53 -0700 (PDT) Message-ID: <4FFF3F39.6050508@gmail.com> Date: Thu, 12 Jul 2012 21:19:00 -0000 From: marco atzeri User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: pthread help References: <34152902.post@talk.nabble.com> In-Reply-To: <34152902.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2012-07/txt/msg00245.txt.bz2 On 7/12/2012 9:48 PM, emon wrote: > > Need urgent help on thread: the goal here is the separtemask will take each > image and separate different contours and for each contour in the image it > will call handleobject thread. So every for loop will call the handeobject > thread. However, object index variable needs to be passed in each thread. > But only last value of objectndex is passed, this is becuase the speratemask > function loops and repalces the value of obj.objindx and only the last value > of obj.objindx is > passed to all the threads. Is there anyway to pass each objectindex > value in handleobject. The code runs fine if we uncomment the > pthread_join(tid[objectIndex],NULL); but it will not give a parralel program > wrong mailing list ??? -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple