News for hackers. Stuff that matters.
Re:GNU Make Jobserver Implementation by lelandbatey on Sunday April 24, 2016 @03:18PM (#11560937)
Toward the very end, the author gives a brief one paragraph explanation of why they didn't use multiple threads:

    Obviously one idea is to use threads. It’s common to have a separate thread
    for dealing with signals and combining threads with semaphores, etc. would
    allow GNU make to wait on two different types of asynchronous events
    simultaneously. This was rejected because so far GNU make was single-threaded,
    and requiring multi-threading was deemed too much of a price to pay.
I'm confused as to why adding multi-threading would be quite so onerous. As I understand it, one could restrict the use of threads to that specific feature and thus avoid large architectural changes.

Do I not understand how Make is designed, or is "the price to pay" in reference to performance or some other metric?

Re:GNU Make Jobserver Implementation by hyc_symas on Wednesday April 27, 2016 @08:16PM (#11585712)
As I noted in my own mention http://highlandsun.com/hyc/#Make I originally wrote that patch back in 1991. There was no such thing as threads back then. Even in 1999 the POSIX threads spec was only up to Draft 6 or so, not yet finalized. Nobody sane would write production code for such a moving target (oh, except maybe Microsoft, using Draft4 to create the Windows NT threads API).
Re:GNU Make Jobserver Implementation by JdeBP on Thursday April 28, 2016 @02:41PM (#11591020)
That parenthetical history is wrong, at least according to Dave Cutler. He traced Windows NT's threading back to his work on VAXELN in 1983, years before POSIX was even thought of. He also was quite obviously deriving the NT API in part from OS/2, again not POSIX, given the whole "mutant"/"mutex" affair.
Re:GNU Make Jobserver Implementation by hyc_symas on Thursday April 28, 2016 @10:28PM (#11593407)
Windows NT RPC is DCE RPC - that is an indisputable fact. DCE used POSIX Draft 4, and Windows copied DCE pretty completely there. https://en.wikipedia.org/wiki/DCEThreads
Re:GNU Make Jobserver Implementation by JdeBP on Monday May 02, 2016 @05:56AM (#11610260)
Well now we know where all of your errors are coming from. Regrettably, you've learned a lot of bunkum, that you now have to un-learn.

The source of that bunkum, or at least the source that you've pointed to, is a canonical example of how rubbish turns into gospel via Wikipedia. It started out, in August 2005, as an intentionally opinionated rant written by someone who didn't supply xyr name, who clearly didn't know the subject, and who pointed to entities that didn't exist at the time in question as xyr authorities.

* https://en.wikipedia.org/w/index.php?title=DCEThreads&oldid=...

Other people came along and tried to take the opinions out and leave the facts. But the underlying problem was that the facts weren't factual at all, and were as warped as the rest of the rant was; and no-one with any actual knowledge of the topic, or research ability, has touched the article significantly in eleven years.

* https://en.wikipedia.org/w/index.php?title=DCEThreads&type=r...

And in the meantime, people come along, believe Wikipedia uncritically, and regurgitate a load of old tripe.

Here are some of the things that you have to learn in place of the un-learned junk:

* There were such things as threads in 1991. There were such things as threads in 1988 when Dave Cutler started on "NT OS/2" at Microsoft. There were such things as threads in 1987 when OS/2 version 1.0 was announced. And indeed in 1983 in VAXELN according to Dave Cutler.

* Threads are not RPC, DCE RPC or otherwise.

* The design of Windows NT threads pre-dated the existence of 1003.4a draft 4 (dated 1990-08-10). By years.

For far better things than Wikipedia to read on this subject, see:

* Inside Windows NT. Particularly page 92 of the 1st edition.

* Cutler's own Windows NT Mutant Specification, written in 1989.

* Mark Russinovich's writings on the subject of Windows NT and its VMS heritage.

* Any good book on OS/2 version 1.0 programming that details the threads API.

* Michael Yam's 1996 Dr Dobbs article on porting his wrapper class library from DCE to Win32 threads.

* Any number of books on the subject of DCE, explaining the two quite different things that are DCE RPC and DCE threads.

Re:GNU Make Jobserver Implementation by 0xcde4c3db on Sunday April 24, 2016 @03:32PM (#11560987)
It might be a portability concern. GNU make runs on a lot of platforms.
Re:GNU Make Jobserver Implementation by Samathy on Sunday April 24, 2016 @08:05PM (#11561905)
Surely the solution there would be to make it a compile-time option. Enable threaded jobs, or process jobs.
Re:GNU Make Jobserver Implementation by Avshalom on Sunday April 24, 2016 @09:12PM (#11562077)
Implementing both sounds like a price to pay.
Re:GNU Make Jobserver Implementation by hyc_symas on Wednesday April 27, 2016 @08:17PM (#11585715)
That would be stupid. Double the amount of work for no increment in functionality.
Re:GNU Make Jobserver Implementation by boris on Monday April 25, 2016 @01:00AM (#11562560)
GNU make is a giant string-chopping hairball written in C over the past 30 years by numerous authors. Paul D. Smith (the current maintainer and the author of this article) has actually been doing a lot of codebase cleanup over the past years. But still any major change is a monumental task.
Re:GNU Make Jobserver Implementation by nullc on Sunday April 24, 2016 @04:31PM (#11561240)
It may be that the bulk of the codebase was not concurrency safe.