public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
From: "Craig A. Vanderborgh" <craigv@voxware.com>
To: pthreads-win32@sources.redhat.com
Subject: WINCE: problems w/CRITICAL_SECTION
Date: Fri, 28 Feb 2003 18:59:00 -0000	[thread overview]
Message-ID: <1046458987.32515.92.camel@zetar> (raw)

Hello Ross, John, and pthreads-win32:

Background:
We have a very big and extremely complex pthreads application that is
mature and has been thoroughly tested.  Basically, it is a continuous
speech recognizer that operates in real time.  We have had it running on
wince for a long while under what I call "craig-threads" - it's a
pthreads subset that lacks condition variable support.  I became
interested in using pthreads-win32 to get complete support for condition
variables and a few other things.

Our application does not work correctly on  pthreads-win32 though, and
for an interesting reason.  It appears that the M$ CriticalSection stuff
isn't working correctly on WINCE, at least for our application.  I did
the following experiments:

1. Ran application under pthreads-win32.  Result: unexpected hang "way
down there"
2. Ran application under craig-threads w/CreateMutexW and associated
stuff for pthread_mutex_*.  Result: works
3. Ran application under craig-threads w/InitializeCriticalSection and
associated stuff for pthread_mutex_*.  Result: same exact behavior as 1.
above.

So it would seem that the M$ CRITICAL_SECTION stuff is implicated.  I
have read that we will be paying a performance penalty if we have to use
a M$ mutex instead of CRITICAL_SECTION.  Is this true, and how bad is
it?  Our application uses synchronization objects with a very high
bandwidth, btw.  Do you think I should modify pthreads-win32 so that one
could optionally use mutex/WaitForSingleObject in place of
CRITICAL_SECTION?  Is there some way I might be able to debug the
CRITICAL_SECTION version(s) of our application?  Please advise.

regards,
craig vanderborgh
voxware incorporated



             reply	other threads:[~2003-02-28 18:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-28 18:59 Craig A. Vanderborgh [this message]
     [not found] <3E5FE3E8.1040009@ise.canberra.edu.au>
2003-03-03 17:07 ` Craig A. Vanderborgh

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=1046458987.32515.92.camel@zetar \
    --to=craigv@voxware.com \
    --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).