make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Updated patch for port of jobserver to Windows


From: Troy Runkel
Subject: Updated patch for port of jobserver to Windows
Date: Mon, 18 Jul 2011 19:30:19 +0000

Attached is an update for the port of jobserver to Windows that I originally 
submitted in October of 2010.  The updated patch includes the following changes.

1) Added ChangeLog entries for each function that was changed or added.
2) Updated jobserver semaphore function calls to include GetLastError() in 
error messages.
3) If -jN is specified to the child gmake, close the jobserver semaphore when 
we disable the jobserver.
4) Limit number of simultaneous jobs to (MAXIMUM_WAIT_OBJECTS - 1), which is 
currently 63.

Unfortunately, there have been problems with the copyright assignment for the 
original patch.  The issue is currently in the hands of the FSF lawyers and I'm 
waiting to hear back from them.  However, I've received multiple requests for 
an updated version of the jobserver patch so I'm submitting this for anybody 
who'd like to give it a try.  Once the copyright assignment issues are resolve, 
this is the patch that should be included in the GNU make trunk.

For anyone who's interested, Paul Smith has an excellent write-up of what the 
GNU make jobserver is and how it works which can be found here: 
http://mad-scientist.net/make/jobserver.html.  The original UNIX pipe jobserver 
implementation doesn't work well on Windows so this patch implements the 
jobserver mechanism using a Windows named semaphore.  Most of the code that 
implements the GNU make jobserver is the same for UNIX and Windows.  The 
differences mainly have to do with creating/destroying/acquiring/releasing the 
semaphore and integrating the semaphore into GNU make's Windows process control 
layer.

--Troy Runkel

Attachment: windows_jobserver.diff
Description: windows_jobserver.diff


reply via email to

[Prev in Thread] Current Thread [Next in Thread]