Commit 837b5275 authored by Amir Hosein Kashani's avatar Amir Hosein Kashani

2.2 middle

parent e56c6048
......@@ -36,6 +36,8 @@ enum procstate { UNUSED, EMBRYO, SLEEPING, RUNNABLE, RUNNING, ZOMBIE };
// Per-process state
struct proc {
int usagepointer;
int usage[100];
uint sz; // Size of process memory (bytes)
pde_t* pgdir; // Page table
char *kstack; // Bottom of kernel stack for this process
......
......@@ -139,6 +139,8 @@ syscall(void)
num = curproc->tf->eax;
if(num > 0 && num < NELEM(syscalls) && syscalls[num]) {
curproc->tf->eax = syscalls[num]();
myproc()->usage[myproc()->usagepointer]=num; // we have an array include all of the usage of another process
myproc()->usagepointer++;//add to config the head of array
} else {
cprintf("%d %s: unknown sys call %d\n",
curproc->pid, curproc->name, num);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment