Page 1 of 3

your favorite function

Posted: Sat Nov 14, 2009 5:29 pm
by VolTeK
what is your favorite function, whether its in C C++ assembly, or whether u made it. the function you use the most that your os or any of your development could not live without. or a function that you use alot. leave a name, but NO SOURCE CODE to that function. (duh) but if you want, tell what it does.


my favorite is the 16 bit assembly made print function, the first function i ever used the most



(Sorry if this is a pointless thread)

Re: your favorite function

Posted: Sat Nov 14, 2009 5:46 pm
by neon
BlpDisplayString. Its basically printf() and works the same way but using the BIOS. Without it some of the libraries in my system would have been far more harder to debug. Other then that my io_services(), which is like a protected mode int86() routine that my boot programs use.

(This seems kind of a pointless thread...)

Re: your favorite function

Posted: Sat Nov 14, 2009 6:19 pm
by Wolf9466
My favorite function is probably the WinSock connect() function.

Re: your favorite function

Posted: Sat Nov 14, 2009 7:25 pm
by yemista
i like my cli function. i made it real efficient

Re: your favorite function

Posted: Sat Nov 14, 2009 7:48 pm
by piranha
get_next_task() :)

-JL

Re: your favorite function

Posted: Sat Nov 14, 2009 8:35 pm
by 01000101
hack_the_gibson() 8)

On a more serious note, probably memclr().

Re: your favorite function

Posted: Sat Nov 14, 2009 8:46 pm
by pcmattman
TcpManager::receive - handler for all incoming TCP packets. It may not be perfect, but I still love reading it :)

Re: your favorite function

Posted: Sat Nov 14, 2009 8:48 pm
by Brynet-Inc
kitchen_sink()

Re: your favorite function

Posted: Sat Nov 14, 2009 9:12 pm
by piranha
Brynet-Inc wrote:kitchen_sink()
More like kitchen_sync()! Ahahahahaha!

More seriously though...I have changed my mind. Instead, it is oh_noes()! <--is my debug function.

-JL

Re: your favorite function

Posted: Sat Nov 14, 2009 11:22 pm
by Colonel Kernel
objc_msgSend(), because so much relies on it.

Re: your favorite function

Posted: Sun Nov 15, 2009 4:37 am
by thepowersgang
I'd go for something like VFS_Open()
It is a thing of beauty (until you see it's helpers :D)

Re: your favorite function

Posted: Sun Nov 15, 2009 11:32 am
by zity
Mine is definitely printf(), couldn't imagine debugging without it :)

Re: your favorite function

Posted: Sun Nov 15, 2009 1:36 pm
by Firestryke31
operator<<() because it's awesome. It can be like printf++.

display << "Hello World " << worldNumber << "!";

worldNumber can be an int, float, short, or class that implements it's own operator<< and changing between them is as easy as changing the declaration and making sure there's an operator<< for the type you want. You don't have to go through and change every %i to %f or whatever and risk changing the wrong one.

Re: your favorite function

Posted: Sun Nov 15, 2009 2:02 pm
by gravaera
I don't mean to make a pointless post, but I really want to say:

Firestryke31++;

Nothing better than being able to transparently handle output on a variety of user-defined classes without anything more than a simple operator overload.

Apart from that:
memoryTrib::memoryTrib();

Because my memory manager was the absolute most challenging thing in my OS, and having almost perfectly completed it, I get a sense of accomplishment knowing I did it without following any tutorials, or copying code from anywhere. *Shrug*. And it's completely SMP safe :D

That's the best part.

Re: your favorite function

Posted: Sun Nov 15, 2009 2:21 pm
by dak91
void *mm_alloc(size_t size);

I cannot imagine my os without this