public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
* PThreads under win95 linked to missing export
       [not found] <997828638.29731.ezmlm@sources.redhat.com>
@ 2001-08-14 15:49 ` Martin van den Nieuwelaar
  2001-08-14 16:21   ` reentrant
  0 siblings, 1 reply; 5+ messages in thread
From: Martin van den Nieuwelaar @ 2001-08-14 15:49 UTC (permalink / raw)
  To: pthreads-win32

Hi People,

I'm new to this list and have recently started using pthreads-win32 so
I could port some UNIX software to the windows environment.

One problem I have run into is a missing export error.  If I take my
app (compiled under win98 SE using ms vc++ 6.0) and pthreadvce.dll
file and put them on a win95 machine (Version 4.00.950B), I get the
following error:

The PTHREADVCE.DLL file is linked to missing export
KERNEL32.DLL:InterlockedCompareExchange

I looked around on the web, and also in the mailing list archives, but
found no reference to this error.  Any thoughts on what might be the
source of my problem, and how to fix it?

TIA,

-Martin

-- 
Expert carrier network traffic analysis and visualisation
http://www.gadgets.co.nz/products.shtml
xenaphobia: The fear of being beaten to a
pulp by a leather-clad, New Zealand woman

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

* Re: PThreads under win95 linked to missing export
  2001-08-14 15:49 ` PThreads under win95 linked to missing export Martin van den Nieuwelaar
@ 2001-08-14 16:21   ` reentrant
  2001-08-14 16:40     ` Martin van den Nieuwelaar
  0 siblings, 1 reply; 5+ messages in thread
From: reentrant @ 2001-08-14 16:21 UTC (permalink / raw)
  To: Martin van den Nieuwelaar, pthreads-win32

The source of the problem appears to be that InterlockedCompareExchange()
"Requires Windows 98 or later" (according to MSDN).

Dave

--- Martin van den Nieuwelaar <martin@gadgets.co.nz> wrote:
> Hi People,
> 
> I'm new to this list and have recently started using pthreads-win32 so
> I could port some UNIX software to the windows environment.
> 
> One problem I have run into is a missing export error.  If I take my
> app (compiled under win98 SE using ms vc++ 6.0) and pthreadvce.dll
> file and put them on a win95 machine (Version 4.00.950B), I get the
> following error:
> 
> The PTHREADVCE.DLL file is linked to missing export
> KERNEL32.DLL:InterlockedCompareExchange
> 
> I looked around on the web, and also in the mailing list archives, but
> found no reference to this error.  Any thoughts on what might be the
> source of my problem, and how to fix it?
> 
> TIA,
> 
> -Martin
> 
> -- 
> Expert carrier network traffic analysis and visualisation
> http://www.gadgets.co.nz/products.shtml
> xenaphobia: The fear of being beaten to a
> pulp by a leather-clad, New Zealand woman


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

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

* Re: PThreads under win95 linked to missing export
  2001-08-14 16:21   ` reentrant
@ 2001-08-14 16:40     ` Martin van den Nieuwelaar
  2001-08-14 19:35       ` Ross Johnson
  0 siblings, 1 reply; 5+ messages in thread
From: Martin van den Nieuwelaar @ 2001-08-14 16:40 UTC (permalink / raw)
  To: pthreads-win32

Ahh,

That would explain it.

I guess the more general question then is, is it intended that
pthreads works only under 98 or later?  How about NT?  Was there ever
a version for 95?  I haven't seen any docs that mention which windows
platforms it works on.  I just want to know before I release my app as
"works under windows" and then find out I have hundreds of users
sending me hate mail because it clearly doesn't work on their system.
:)

Regards,

-Martin

reentrant wrote:
> 
> The source of the problem appears to be that InterlockedCompareExchange()
> "Requires Windows 98 or later" (according to MSDN).
> 
> Dave
> 
> --- Martin van den Nieuwelaar <martin@gadgets.co.nz> wrote:
> > Hi People,
> >
> > I'm new to this list and have recently started using pthreads-win32 so
> > I could port some UNIX software to the windows environment.
> >
> > One problem I have run into is a missing export error.  If I take my
> > app (compiled under win98 SE using ms vc++ 6.0) and pthreadvce.dll
> > file and put them on a win95 machine (Version 4.00.950B), I get the
> > following error:
> >
> > The PTHREADVCE.DLL file is linked to missing export
> > KERNEL32.DLL:InterlockedCompareExchange
> >
> > I looked around on the web, and also in the mailing list archives, but
> > found no reference to this error.  Any thoughts on what might be the
> > source of my problem, and how to fix it?
> >
> > TIA,
> >
> > -Martin


-- 
Expert carrier network traffic analysis and visualisation
http://www.gadgets.co.nz/products.shtml
xenaphobia: The fear of being beaten to a
pulp by a leather-clad, New Zealand woman

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

* Re: PThreads under win95 linked to missing export
  2001-08-14 16:40     ` Martin van den Nieuwelaar
@ 2001-08-14 19:35       ` Ross Johnson
  0 siblings, 0 replies; 5+ messages in thread
From: Ross Johnson @ 2001-08-14 19:35 UTC (permalink / raw)
  To: Martin van den Nieuwelaar; +Cc: pthreads-win32

Martin van den Nieuwelaar wrote:
> 
> I guess the more general question then is, is it intended that
> pthreads works only under 98 or later?  How about NT?  Was there ever
> a version for 95?  I haven't seen any docs that mention which windows
> platforms it works on.  I just want to know before I release my app as
> "works under windows" and then find out I have hundreds of users
> sending me hate mail because it clearly doesn't work on their system.
> :)

I must have missed checking this before using
InterlockedCompareExchange in the barrier and spinlock routines
that were added at snapshot 2001-07-12. I run the testsuite
on a Win98 machine before releasing snapshots.

Snapshot 2001-07-03 should be OK to use. Apart from not having
spinlocks and barriers, there are only a few minor bug fixes
that are the difference.

I'll have to fix this for the next snapshot so that Win95 and
pre-NT4.0 is properly supported again.

Thanks for pointing out the error.
Ross

> 
> Regards,
> 
> -Martin
> 
> reentrant wrote:
> >
> > The source of the problem appears to be that InterlockedCompareExchange()
> > "Requires Windows 98 or later" (according to MSDN).
> >
> > Dave
> >
> > --- Martin van den Nieuwelaar <martin@gadgets.co.nz> wrote:
> > > Hi People,
> > >
> > > I'm new to this list and have recently started using pthreads-win32 so
> > > I could port some UNIX software to the windows environment.
> > >
> > > One problem I have run into is a missing export error.  If I take my
> > > app (compiled under win98 SE using ms vc++ 6.0) and pthreadvce.dll
> > > file and put them on a win95 machine (Version 4.00.950B), I get the
> > > following error:
> > >
> > > The PTHREADVCE.DLL file is linked to missing export
> > > KERNEL32.DLL:InterlockedCompareExchange
> > >
> > > I looked around on the web, and also in the mailing list archives, but
> > > found no reference to this error.  Any thoughts on what might be the
> > > source of my problem, and how to fix it?
> > >
> > > TIA,
> > >
> > > -Martin
> 
> --
> Expert carrier network traffic analysis and visualisation
> http://www.gadgets.co.nz/products.shtml
> xenaphobia: The fear of being beaten to a
> pulp by a leather-clad, New Zealand woman

-- 
+-------------------------+---+
| Ross Johnson            |   | "Come down off the cross
| Management & Technology |___|  We can use the wood" - Tom Waits
| Building 11                 |
| University of Canberra      | eMail: rpj@ise.canberra.edu.au
| ACT    2601                 | WWW:  
http://public.ise.canberra.edu.au/~rpj/
| AUSTRALIA                   |
+-----------------------------+

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

* Re: PThreads under win95 linked to missing export
@ 2001-08-15 13:20 van Lieshout, Fred
  0 siblings, 0 replies; 5+ messages in thread
From: van Lieshout, Fred @ 2001-08-15 13:20 UTC (permalink / raw)
  To: 'martin@gadgets.co.nz',
	'pthreads-win32@sources.redhat.com'

The source of the problem appears to be that InterlockedCompareExchange()
"Requires Windows 98 or later" (according to MSDN).Dave--- 
Martin van den Nieuwelaar <martin@gadgets.co.nz> wrote:
> The PTHREADVCE.DLL file is linked to missing export
KERNEL32.DLL:InterlockedCompareExchange 

Martin,

Just in case you really need the latest pthread lib, here's a work around
that may do the trick: create your 'own' InterlockedCompareExchange function
using  some assembly code (not the best optimised, I know) and the Intel
CMPXCHG instruction:

extern PVOID InterlockedCompareExchange(PVOID *shared, PVOID v, PVOID c)
{
  PVOID result;

  _asm {
    PUSH         ecx
    PUSH         edx
    MOV          ecx,dword ptr [shared] ; Load ECX with plTarget
    MOV          edx,dword ptr [v]      ; Load EDX with lValue
    MOV          eax,dword ptr [c]
    LOCK CMPXCHG dword ptr [ecx],edx    ; if (EAX == [ECX]), 
                                        ;   [ECX] = EDX
			                      ; else
						    ;   EAX = [ECX]
    MOV          dword ptr [result], eax
    POP          edx
    POP          ecx
  }
  return result;
}

With thanks to an article on MSDN (search on the function's name).

Cheers,
Fred

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

end of thread, other threads:[~2001-08-15 13:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <997828638.29731.ezmlm@sources.redhat.com>
2001-08-14 15:49 ` PThreads under win95 linked to missing export Martin van den Nieuwelaar
2001-08-14 16:21   ` reentrant
2001-08-14 16:40     ` Martin van den Nieuwelaar
2001-08-14 19:35       ` Ross Johnson
2001-08-15 13:20 van Lieshout, Fred

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).