Inline Assembler for wrapper function doesn't work for some reason

后端 未结 2 983
鱼传尺愫
鱼传尺愫 2021-01-25 02:22

I\'m trying to write a wrapper function for read() system call , using asm volatile , but it won\'t work , since the res doesn\'t change its value .

Here\'s the code :

2条回答
  •  忘掉有多难
    2021-01-25 02:45

    Run it under strace to see what's happening for sure, but I think your problem is that you put all the inputs in the output register list rather than the input register list...

提交回复
热议问题