LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Create a new system call (https://www.linuxquestions.org/questions/linux-newbie-8/create-a-new-system-call-629614/)

jianelisj 03-21-2008 03:48 AM

Create a new system call
 
I would like to create a new system call with the help of process manager whick accepts an integer and prints its square.
Please any help

felixc 03-21-2008 06:44 AM

Hi,

Are you sure you mean a system call, and not, say, a program? Creating a new system call would require creating and loading a kernel module. It would also have nothing to do with your process manager.

Now, given the open nature of Linux, this is entirely possible, but I suspect that anyone getting in to kernel hacking would know enough to a) know about /usr/src/linux-headers-* b) know how to find this info on his/her own.

So in summation, confirm that you really want to create a system call, and not a program. Then use Google, or your favorite alternative search engine.


PS - Is this a school homework assignment? If so, go earn your own damn degree.
Edit: By the list of other posts by this user, it sure looks like it.

simplicissimus 03-21-2008 09:18 AM

shell syntax
 
If your definition of a 'system call' means anything that is available on the commandline (also called console, terminal, shell), then you need something like:

Code:

$ echo $((2*2))
4

Hope this helps,
Regards,
SIMP

Tinkster 03-21-2008 04:42 PM

Quote:

I would like to create a new system call with the help of process manager whick accepts an integer and prints its square.
Can you please post your homework assignment verbatim?
The question is rather ambiguous.

Oh, wait, you're not allowed to post homework questions,
even less so in Greek. Silly me.



Cheers,
Tink


P.S.: Thread closed.


All times are GMT -5. The time now is 03:48 PM.