Reputation: 69
I have a Linux kernel with a custom system call. In C, I can use the standard C library syscall() to call a system call by its number. How can I call this new system call in Go?
In C, on Linux, there are also macros that can emit the needed inline assembly to make a system call directly.
I would hate to have to hack syscall_linux.go.
I see that in Go, syscall_linux.go is processed by a perl script (mysyscall.pl) to generate assembly. That is also pretty complicated and hacking it to generate a new stub also seems needlessly messy.
Upvotes: 2
Views: 3655