Wine on Debian on sun4m

Vincent Béron vberon at mecano.gme.usherb.ca
Tue Oct 12 07:43:04 CDT 2004


Le mar 12/10/2004 à 09:23, Saulius Krasuckas a écrit :
[snip]
> > 
> > 
> >  	Hmmm. Seems that either there is an official patch to apply, or 
> > that I won't be able to run wine on sun4u ... I'm have not enough skill in 
> > C at this time.
> 
> Yes, Wine says it needs an implementation of interlocked* functions for 
> your CPU.  That is quite strange, as they seems to be implemented already:
> 
> s2 at austechia:/usr/src/wine-20040914$ grep -iA10 sun libs/port/interlocked.c
> #elif defined(__sparc__) && defined(__sun__)

__sun__ is defined when building for SunOS, not Linux. __sparc__ is the
cpu architecture. Usually those functions are written in ASM as C can't
provide access to the particular instructions needed to do the locking.

I just implemented those for __ALPHA__. If you don't know how/can't be
bothered to do them in sparc assembly (which won't run on earlier
machines as the following comment says), AND Debian don't provide the
lwp libs, you can probably do the same using pthread primitives. I just
hope that Wine's pthread replacement functions do not call the
interlocked* functions, or it'll probably don't work correctly.

> 
> /*
>  * As the earlier Sparc processors lack necessary atomic instructions,
>  * I'm simply falling back to the library-provided _lwp_mutex routines
>  * to ensure mutual exclusion in a way appropriate for the current
>  * architecture.
>  *
>  * FIXME:  If we have the compare-and-swap instruction (Sparc v9 and above)
>  *         we could use this to speed up the Interlocked operations ...
>  */
> 
> 
> Maybe some defines don't work?  I am going to simplify this c-file out to
> find the inconsistence (during the next slice of my free time at this
> machine).

As I said, __sun__ is the OS, __sparc__ the cpu. On Debian, __sun__ is
not defined.

Vincent





More information about the wine-devel mailing list