next up previous
Next: Creating a stub for Up: Adding a System Call Previous: Define the entry point

Implementation code

First of all, create a header file somename.h for your system call and place it in arch/um/include as shown in listing 1.


\begin{lstlisting}[frame=tb,indent=20pt,caption={
somename.h}]
/* somename.h */
...
...ME_H
...

Then, write out the implementation somename.c of your system call in arch/um/kernel as shown in listing 2.


\begin{lstlisting}[frame=tb,indent=20pt,caption={
somename.c}]
/* somename.c */
...
...{
printk (''Hello, from then new system call!\n'');
return;
}
\end{lstlisting}

Finally, modify the respective Makefile in arch/um/kernel and add somename.o to the list of build targets.



Alexandros Karypidis 2002-03-25