<br><br><div class="gmail_quote">On Wed, Dec 26, 2012 at 1:04 PM, Niroj Pokhrel <span dir="ltr">&lt;<a href="mailto:nirojpokhrel@gmail.com" target="_blank">nirojpokhrel@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi, <br>I have written a system call and build it with kernel for Arm architecture. However, I&#39;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. <br>

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&#39;m</blockquote><div><br></div><div>care to show us how you called system call in assembly in ARM?</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> confused is how to call this function using C program. I tried using inline assembly but it didn&#39;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. <br>

Thanking you in advance.<span class="HOEnZb"><font color="#888888"><br clear="all"><br></font></span></blockquote><div><br></div><div>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?</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888">-- <br>Niroj Pokhrel<br>Software Engineer,<br>Samsung India Software Operations<br>

</font></span><br>_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Regards,<br>Peter Teoh