Anyway, I have an interrupt system call setup (x86 32bit targeting i686) where all of the arguments etc to the system call is placed on a stack in standard C ABI format. I need a macro or some kind of existing code that allows me to easily implement wrappers around these calls so that user-mode programmers don't need to worry about writing assembly, and so that I don't need a huge amount of assembly for every system call wrapper. I've look at linux/syscalls.h, but it's incredibly difficult to understand and I assume provides a lot more than I need. It would be ideal if there was some way of defining something like:
Code: Select all
__interrupt(0x80) void someCall(int which, uint32_t buffer ...)
Does something like this exist, and somewhat portable between both GCC and Clang?