From mboxrd@z Thu Jan 1 00:00:00 1970 From: martinez.javier@gmail.com (Javier Martinez Canillas) Date: Sun, 12 Jun 2011 02:59:33 +0900 Subject: system call In-Reply-To: References: Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Sat, Jun 11, 2011 at 6:39 PM, Venkateswarlu P wrote: > > > Where do i find system call implementation code? > > for? read, write, open, close For file system related syscalls, it would depend on the fs implementation. The Virtual File System only defines a uniform common high level layer but is the responsibility of every fs to actually implement the file operations (open, read, write, etc). There is some generic file operations in linux/fs/read_write.c that are used for simple fs like romfs and ramfs. I would recommend start looking at these memory file systems first. Then you could look how real file systems operations are implemented. Every fs usually have a file.c file where a struct file_operations is defined. This structure has a function pointer for every file operation. The functions asigned to these function pointers are the ones that actually implements the operations. Some of these could be generic operations and some of them are fs specific. Hope it helps, -- Javier Mart?nez Canillas (+34) 682 39 81 69 PhD Student in High Performance Computing Computer Architecture and Operating System Department (CAOS) Universitat Aut?noma de Barcelona Barcelona, Spain