This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: sem_getvalue patch


Sam,

This has been discussed in the past, but I'll fill you in.  First off,
kde-cygwin does NOT use the native semaphores for shared memory.  These
symbols are turned off by default when cygwin is built.  If you wish to
use them via the native cygserver, you must patch the sources for them to
work.  Please see:
http://www.cygwin.com/ml/cygwin-developers/2002-03/msg00000.html

Now this code is highly unstable, but I do encourage you to give it a try,
as we need feedback on how cygserver works with kde.  Now for the hard
part...  Kde-cygwin is compiled against the independant cygipc code, which
also impliments SysV IPC shared memory.  You can learn more about this at:
http://www.neuro.gatech.edu/users/cwilson/cygutils/cygipc/index.html

Now here's the rub, cygipc has been deprecated in favor of the native
cygserver.  The reason cygipc isn't being used is one of licensing, as the
cygipc code was gleaned in part from the linux kernel and therefore cannot
be a part of cygwin's dll (according to the license).  Even worse is the
difference in the size of the key_t operation, where cygipc implements it
as 32bit and cygserver uses 64bit for reasons I will not go into detail
on.  So what does this mean?  If you enable and use cygserver, any
binaries compiled with cygipc shm will be broken.  This includes the kde
version of X11, QT, and KDE itself.  However, Chuck has made it quite
clear that the original cygipc is deprecated and therefore no longer
accepting patches.  Again, we really need someone to put cygserver through
its routines, so here is what I suggest:

1)Remove the kde X11, QT, and KDE bianaries.
2)Remove the cygipc package (very important as it's headers confilict with
cygserver).
3)Download the latest cvs cygwin sources and patch for cygserver support.
4)Start up the "cygserver &"
4)Compile and run Roberts test suite.
5)Assuming all goes well...
6)Politely ask Ralf to repost his patches for the X11 server and the magic
configuring option needed to turn on shm support in X11.
7)Follow the instructions to obtain the X11 source, given at:
http://xfree86.cygwin.com/docs/cg/cygwin-xfree-cg.html
8)Add Ralf's patches and recompile X11, and assuming it compiled, install
it.
9)Recompile and install QT from the latest kde-cygwin cvs sources.
10)Recompile and install kde.
11)Debug, Debug, Debug....
12)Patch, Patch, Patch....

This should give you an idea of what's required.  We *NEED* your help, as
you seem to have a grasp of shared memory and its workings.  So poke
around the sources and if you find fixes needed for the cygserver, submit
a patch to cygwin-patches mailing
list(http://cygwin.com/ml/cygwin-patches/).  Any patches to the X11 code
should be discussed on the cygwin-xfree mailing list.  Feel free to
discuss the cygserver in the main cygwin mailing list, as I'm sure Robert
would appreciate feedback.  For kde/qt specific discussions, please feel
free to discuss them on the kde-cygwin mailing list.

I hope this has given you a general idea as to the benefits and pitfalls
involved in this.  Good Luck and Happy Cygwin'ing :-).

Cheers,
Nicholas
--- "Robb, Sam" <sam.robb@timesys.com> wrote:
> Folks,
>  
> I was seeing how well the latest version of arts compiled under Cygwin,
> and noticed that the only real complaint was the lack of
> sem_getvalue()...
> so I took the dive, fetched the latest Cygwin source from CVS, and poked
> around to see what needed to be done.
>  
> With a little effort, I've managed to build a cygwin1.dll that exports
> sem_getvalue().  The version of cygwin1.dll that I built seems subtly
> hosed, though - while I can compile and run my test program from
> within a Windows cmd.exe shell, trying to run bash or ls (and probably
> a great many other things) hangs.
>  
> So, a couple of questions:
>  
> 1) What's wrong with my cygwin1.dll?  Did I miss some special magic
> I need to do in addition to adding an export to cygwin.din?
>  
> 2) Assuming that I can resolve the apparent export problem and produce
> a working cygwin1.dll, is there any interest in a patch for
> sem_getvalue()?
> Or was it left unimplemented for a reason (other than lack of
> need/time?)
>  
>   Thanks,
>  
> -Samrobb
> 


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]