Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Heh, I went spelunking through the bsd/mach layers of the code, was quite a bit of fun.

Looks like they've only released the x86_64 and x86 versions of the code? I don't see any ARM in there.

Anyways, found gems like this [1]:

  /*
   *	File:	sched_prim.c
   *	Author:	Avadis Tevanian, Jr.
   *	Date:	1986
   *
   *	Scheduling primitives
   *
   */
I hope to leave a legacy like this someday, hopefully someone will appreciate the author's comments 30 years later!

[1] https://opensource.apple.com/source/xnu/xnu-3789.1.32/osfmk/...



They are never releasing the full source code. Apple strips the ARM architecture, blocks of code for features they do not want to be open source, and the internal documentation before throwing these dumps over the wall.

Here are some hints of what they are doing to process the original sources:

https://opensource.apple.com/source/hfs/hfs-366.1.1/make_ope...


Thanks, quite interesting:

    # Check for remaining bad file names
    BADFILES=`find . \( -name "*.arm*" -o -name "arm*" \) | xargs echo`;
    ...
    # Check for remaining bad file contents
    if grep -iEr '([^UD_]_?_OPEN_SOURCE_|XNU_HIDE_SEED|XNU_HIDE_HARDWARE|CONFIG_EMBEDDED)' .; then


BTW some of their open source code (like XNU, the kernel) is on GitHub: https://github.com/opensource-apple/xnu


> https://github.com/opensource-apple

> MIRROR ONLY, UNOFFICIALLY

Someone took it and uploaded it to GitHub. This was not published by Apple. Also has not been updated in years.


It was updated two months ago in September 15th 2016: https://github.com/opensource-apple/xnu/pull/4


Okay, right. I was mislead as all commits use a different author (opensource-apple is only the committer), so the activity graph on the profile is mostly empty.


For giggles, here are some comments I grepped from the WinNT kernel: https://gist.github.com/turbo/75f0905275c29a3049f983cfe273ea...


Oh man, this is hilarious!

../tdi/tcpip/tcp/tcpsend.c:// STUPID FUCKING COMPILER generates incorrect code for this.

../fastfat/allocsup.c:// God knows what state we left the disk allocation in.

../dd/histgram/cmd/perfhist/perfhist.c:// the heck? we are gods anyways!

../nthals/halntp/mips/xxinitnt.c:// to the HAL by the NT god. Hail Caesar!

../w32/ntgdi/client/dcquery.c:// if cjotma == 0, this is HONEST to God unicode font, can not convert

../w32/ntgdi/fondrv/tt/ttfd/fontfile.h:// honest to God msft unicode font

../w32/ntgdi/fondrv/tt/ttfd/tt.h:// uint16 reservedPad; // only God knows why

../se/ctlpcqos.c:// Appease the compiler Gods.

../cntfs/create.c:// Here is the "M A R K [REDACTED]" hack from hell.

../afd/disconn.c:// Hack-O-Rama. TDI has a fundamental flaw in that it is often impossible

../afd/disconn.c:// Yet another hack to keep it from crashing

../fastfat/read.c:// Deal with stupid people who open the volume DASD with

../afd/recvdg.c:// Bomb off if the user is trying to do something stupid, like


These are hilarious, thanks.

> to the HAL by the NT god. Hail Caesar!


where did you get the source to grep through?


Just look a few comments below.


The kernel was open sourced?


  /*
   *	Author:	Avadis Tevanian, Jr. */
   */
Avie Tevanian did go on to leave quite a legacy. He was Apple's software CTO up until 2006 and was responsible for much of the Mac OS X we know today!


Avie was one of the lead developers of Mach at Carnegie Mellon as well, so his legacy extends beyond macOS and NEXTSTEP.

But I'd argue that beyond code, probably his most important Apple role was establishing a steady release schedule. After the disasters of the Pink (later spun off as Taligent), Copland and Gershwin megaprojects, Avie managed to get Apple to focus on making small steady releases.

And while MacOS X was a megaproject, it too was released in steady steps: Rhapsody, Mac OS X Server 1.0, MacOS X Public Beta and then finally Mac OS X 10.0



From the source with a false `CONFIG_SCHED_DEFERRED_AST` flag :)

/* We don't support deferred ASTs; everything is candycanes and sunshine. */




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: