Skip to contentSkip to conversation

How to write System calls?

DISCUSSION DINH Viet Hoa 1 participant 1 message Oct 30, 2001 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 7 lines · Rajat Chadda

Yes -- system calls can be implemented
as modules.
prog8.c is a module.
prog9.c is a user-space program.

In <asm/unistd.h> -- add
#define __NR_my_func 250

thanks but my question was rather:
"in which case should we implement a new syscalls rather than a device and a ioctl ?"

ie : what is better ? a new device and ioctl or new syscalls ?

and in which case, we should use one rather than the other ?

Signature · 3 lines
DINH Viêt Hoà, ingénieur associé, projet PARIS
IRISA-INRIA, Campus de Beaulieu, 35042 Rennes cedex, France
Tél: +33 (0) 2 99 84 75 98, Fax: +33 (0) 2 99 84 25 28