public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
* problems with pthread_mutex_lock()
@ 2003-09-22 16:59 martines
  0 siblings, 0 replies; 2+ messages in thread
From: martines @ 2003-09-22 16:59 UTC (permalink / raw)
  To: pthreads-win32

I'm working on an C++ application and I'm at the stage when I have to choose
threads API. Since I want my program to be cross-platform (at least linux
and windows) I've decided to use pthreads. Besides I've already used
pthreads on linux a bit so I'm more or less familiar with them. I've chosen
pthreads-win32 as an pthreads implementation on windows. Unfortunately first
call to pthread_mutex_lock() bails out my program (mutex is initilized). At
the bottom of this post there is a link to the sources of my application so
from now on I'll be referering to source file and line. Failing
pthread_mutex_lock() call is at the seeker.cpp:101. I don't yet make any
other than mutex initilize/lock/unlock pthreads calls. In particular I don't
create any threads. Strange thing is that when lock/unlock call is placed
somewhere else in the code (seeker.cpp:45) everything works alright.  I've
tried using all flavours of pthreadV*.dll-s without success. When running in
debug mode after entering pthread_mutex_lock() call it bails out saying:
unhandled exception in skr.exe (KERNEL32.DLL): 0xC0000005: Access Violation.
I've to mention that the same code compiled on linux with linux pthreads
runs there just fine. On windows I've been using VC++6 with SP5. What am I
doing wrong? Can anybody please help me? Thank you in advance.

My program sources:
http://info.wsisiz.edu.pl/~aljawahi/skr.zip
Just in case: as of yet there is no output on console. All of the output is
written to scanner01.dbg/scanner01.log files

best regards,
martines

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: problems with pthread_mutex_lock()
@ 2003-09-22 19:34 martines
  0 siblings, 0 replies; 2+ messages in thread
From: martines @ 2003-09-22 19:34 UTC (permalink / raw)
  To: pthreads-win32

ok, problem solved. As usual, stupid error on my side, arghhh.....

best regards,
martines

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-09-22 19:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-22 16:59 problems with pthread_mutex_lock() martines
2003-09-22 19:34 martines

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).