To get acquainted with the system call, we want to add the readcount SysCall to the xv6 kernel. This project is implemented in a two-person team. (me and Reyhaneh Abtahi)
In the first step to change this kernel, we install qemu emulator and apply these changes in this emulator so that the whole system will not be locked in case of any problem.
sudo apt-get install qemu-kvm
sudo apt-get install git
git clone https://github.com/mit-pdos/xv6-public.git
cd xv6-public
make qemu-nox
This system call returns the number of system calls from the time the system was booted to the present time.
Run this code!
#include "types.h"
#include "stat.h"
#include "user.h"
#include "fcntl.h"
int
main(void){
printf(1,"Hi, the number of read syscall is %d so far!\n", getreadcount());
exit();
}
Contact me @:
e-mail:
Telegram id: