public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
From: "martines" <martiness1@poczta.onet.pl>
To: <pthreads-win32@sources.redhat.com>
Subject: problems with pthread_mutex_lock()
Date: Mon, 22 Sep 2003 16:59:00 -0000	[thread overview]
Message-ID: <001801c3812a$7f872a40$ae40793e@martinezwinxp> (raw)

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

             reply	other threads:[~2003-09-22 16:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-22 16:59 martines [this message]
2003-09-22 19:34 martines

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='001801c3812a$7f872a40$ae40793e@martinezwinxp' \
    --to=martiness1@poczta.onet.pl \
    --cc=pthreads-win32@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).