From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7740 invoked by alias); 4 May 2002 18:28:23 -0000 Mailing-List: contact pthreads-win32-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: pthreads-win32-owner@sources.redhat.com Received: (qmail 7706 invoked from network); 4 May 2002 18:28:23 -0000 Received: from unknown (HELO a.smtp-out.sonic.net) (208.201.224.38) by sources.redhat.com with SMTP; 4 May 2002 18:28:23 -0000 Received: (qmail 736 invoked from network); 4 May 2002 18:28:22 -0000 Received: from prop.sonic.net (208.201.224.193) by a.smtp-out.sonic.net with SMTP; 4 May 2002 18:28:22 -0000 Received: from hawksoft.com (adsl-209-204-172-76.sonic.net [209.204.172.76]) by prop.sonic.net (8.11.6/8.8.5) with ESMTP id g44ISMf11406; Sat, 4 May 2002 11:28:22 -0700 X-envelope-info: Message-ID: <3CD428AB.2CA13F2@hawksoft.com> Date: Sat, 04 May 2002 11:28:00 -0000 From: "Phil Frisbie, Jr." Organization: Hawk Software X-Accept-Language: en,pdf MIME-Version: 1.0 To: ssundaragopalan@hss.hns.com CC: pthreads-win32@sources.redhat.com Subject: Re: pthread_init_mutex problem References: <65256BAF.00273A7F.00@sampark.hss.hns.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002/txt/msg00059.txt.bz2 ssundaragopalan@hss.hns.com wrote: > > hi all, > i am new to this mailing list. i am using pthreads for windows and > have the following problems. > The function pthread_mutex_init is taking up CPU to a large extent....In > our program we have a lock for each data structure and this data struture > is initialized every time a new messsage is received. So under Load > conditions the CPU utilization is reaching 100%. > Can anyone suggest some ways to bring down this. You can reuse your data structure. I am already doing this in my HawkNL network library for the internal socket structures. The socket structure includes 2 mutexes. When I 'free' a socket, the structure in marked as free, and the mutexes are reused when I need a new socket. > regds, > srikanth Phil Frisbie, Jr. Hawk Software http://www.hawksoft.com