Can we do system calls like that in D?
rempas
rempas at tutanota.com
Wed Nov 10 07:11:31 UTC 2021
On Tuesday, 9 November 2021 at 12:28:59 UTC, Adam D Ruppe wrote:
>
> I'd be very easy to do that as a library mixin. You'd write
>
> @syscall(45) void whatever();
>
> mixin BindSyscalls;
>
> and then the library generates the bodies as inline asm.
Hello Adam! Well this is not exactly the behavior I was looking
for, you see in this solution, there are two problems:
1. The mixins will get generated by the compiler (if I'm not
mistaken) so it will worsen the compilation times VS if it was a
simple function like in Vox.
2. I don't care about the syntax, neither than the fact that you
can give the function an name you want (aliases can be used for
that) but for the fact that with these way in Vox, you don't have
to manually write inline assembly.
It seems that I'm out of luck so inline assembly, here I go
(unfortunately)! Thanks for your time and have a great day!
More information about the Digitalmars-d-learn
mailing list