5 ms·
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 cod
by filereaper 10y ago
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/kern/sched_prim.c.auto.html https://opensource.apple.com/source/xnu/xnu-3789.1.32/osfmk/...
- minxomat 10y agoFor giggles, here are some comments I grepped from the WinNT kernel: https://gist.github.com/turbo/75f0905275c29a3049f983cfe273eae2 https://gist.github.com/turbo/75f0905275c29a3049f983cfe273ea...
- SSLy 10y agowhere did you get the source to grep through?
- minxomat 10y agoJust look a few comments below.
- Gruselbauer 10y agoThese are hilarious, thanks. > to the HAL by the NT god. Hail Caesar!
- hashin 10y agoOh 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
- fidz 10y agoThe kernel was open sourced?
- prashnts 10y agoFrom the source with a false `CONFIG_SCHED_DEFERRED_AST` flag :) /* We don't support deferred ASTs; everything is candycanes and sunshine. */
- Reason077 10y ago/* * 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!
- ed_blackburn 10y agohttps://en.wikipedia.org/wiki/Avie_Tevanian https://en.wikipedia.org/wiki/Avie_Tevanian
- huxley 10y agoAvie 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
- raimue 10y agoThey 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_opensource.sh.auto.html https://opensource.apple.com/source/hfs/hfs-366.1.1/make_ope...
- dorianm 10y agoThanks, 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
- dorianm 10y agoBTW some of their open source code (like XNU, the kernel) is on GitHub: https://github.com/opensource-apple/xnu https://github.com/opensource-apple/xnu
- raimue 10y ago> https://github.com/opensource-apple 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.
- dorianm 10y agoIt was updated two months ago in September 15th 2016: https://github.com/opensource-apple/xnu/pull/4 https://github.com/opensource-apple/xnu/pull/4
- raimue 10y agoOkay, 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.