Do these functions have the same number and types of parameters?
Do these functions have the same number and types of parameters?
hmm... This is a set of system function or system calls:
one function is printf, the other is something else so I think that they have different set of parameters...
I have to do the same thing that the operating system uses to make a system call. It calls a function in the array accordingly to a specified address in the array.
example:
printf has some specified address in the array and it automatically calls that addres when needed. My programme has to call that function if I specify the same address in the array but I have to do that explicitly ( I have to perform the call of that function accordingly to the specified position in the array).
Remember that you won't be allowed to do some things which the kernel is allowed to do. In your situation I would use a switch() block to handle each call separately. You'll probably have to map all the arguments to some generic type like void* before entering the switch() and then remap them to proper types when calling the methods. If you were using Qt, I'd tell you to use QMetaObject::invokeMethod(), but I guess you don't use Qt![]()
Bookmarks