[M3devel] fcntl last parameter int vs. pointer

Jay K jay.krell at cornell.edu
Sat Jul 14 10:27:23 CEST 2012


Thoughts on

Unix__fcntl(int fd, int request, int arg)
{
    return fcntl(fd, request, arg);
}

vs.

Unix__fcntl(int fd, int request, INTEGER arg)
{

    return fcntl(fd, request, arg);

}



where int is 32bits and INTEGER is exactly the same size as a pointer.


Will it "just work" if I change it?
arg is sometimes a pointer, sometimes an integer, maybe sometimes other?
Ok, let's assume 32bit integer and 32bit or 64bit pointer are the only possibilities.
Are there calling conventions that care? And will pass the parameter differently/wrong?


Do any calling conventions pack multiple smaller-than-64bit parameters into one 64bit register?


I'm *guessing* no.
I guess, as well, I can experiment with a few...



 - Jay
 		 	   		  


More information about the M3devel mailing list