Re: Funny comments in your OS's Source code?
Posted: Mon Apr 28, 2014 10:31 am
That one is good - the first one to make me laugh.
The Place to Start for Operating System Developers
http://forum.osdev.org./
Code: Select all
commit da67fd4fd32d16dcd6b4cb0b63497a9925a2ef35
Author: John Hodge <[email protected]>
Date: Sat Oct 2 21:56:44 2010 +0800
Placed a comment to not the location of the blocker
diff --git a/Kernel/threads.c b/Kernel/threads.c
index 3b73111..b9d59f3 100644
--- a/Kernel/threads.c
+++ b/Kernel/threads.c
@@ -1044,6 +1044,9 @@ void Mutex_Release(tMutex *Mutex)
Mutex->Owner = Mutex->Waiting; // Set owner
Mutex->Waiting = Mutex->Waiting->Next; // Next!
// Reset ->LastWaiting to NULL if we have just removed the last waiting thread
+ // 2010-10-02 21:50 - Comemerating the death of the longest single
+ // blocker in the Acess2 history. REMEMBER TO
+ // ____ING MAINTAIN YOUR ____ING LISTS DIPWIT
if( Mutex->LastWaiting == Mutex->Owner )
Mutex->LastWaiting = NULL;
Code: Select all
/* damn that bloody numlock stuff - ok I'd rather XFree got fixed to not */
/* have it as a modifier and everyone have to write specific code to mask */
/* it out - but well.... */
/* ok under Xfree Numlock and Scollock are lock modifiers and we need */
/* to hunt them down to mask them out - EVIL EVIL EVIL hack but needed */
Code: Select all
/* Compiling this System for Windows? Huh? */
#ifdef __WIN32
/* Required for Windows, Maybe that's why Windows is slow and unresponsive sometimes? */
#define if while
#endif
Code: Select all
#define volatile // this one is cool
Code: Select all
somewhere:
// Apple gonna be mad when they see this code
somewhere else:
// Just kidding. Apple doesn't read my code. Too good for them
Code: Select all
In Java:
// Make sure on these compound operations you catch all your IOExceptions and make it as complex-looking as possible to woo the girls taking Visual Basic
One of my favorites of all time - when I read this source to this day I laugh - in C++:
// Too lazy to declare namespace std; it looks like a colonoscopy up in here