On Wed, Dec 26, 2012 at 1:04 PM, Niroj Pokhrel <nirojpokhrel@xxxxxxxxx> wrote:
Hi,
I have written a system call and build it with kernel for Arm architecture. However, I'm confused to use it to call it from the user space. As it is in x86, where we can simply call by using sycall() function and the return value is returned by the syscal() itself.
In Arm, I tried to write an assembly language program and was able to call the system call using the assembly code but what I'm
care to show us how you called system call in assembly in ARM?
confused is how to call this function using C program. I tried using inline assembly but it didn't work. Further, if I can implement it using inline assembly then return value will be in r0 and how can I move this value to the user variable.
Thanking you in advance.
arch/arm/kernel/entry-common.S (and kernel/calls.S) pair up together to implement the pre-syscall and post-syscall wrapper as you have asked. perhaps u can try to understand the code first?
--
Niroj Pokhrel
Software Engineer,
Samsung India Software Operations
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Regards,
Peter Teoh
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies