This is the mail archive of the pthreads-win32@sources.redhat.com mailing list for the pthreas-win32 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: pthread_init_mutex problem


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]