Skip to content

Commit

Permalink
Update EX2 report
Browse files Browse the repository at this point in the history
Fix a bug in get_callers system call

Fix some typos in report
  • Loading branch information
PashaBarahimi committed Nov 15, 2022
1 parent 4e73bfe commit ef63db9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Binary file modified EX2 - System Calls/Report.docx
Binary file not shown.
4 changes: 3 additions & 1 deletion xv6-public/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,9 @@ get_callers(int syscall_number) {
}

int i = (limit > PROC_HIST_SIZE) ? limit % PROC_HIST_SIZE : 0;
while(1) {
limit %= PROC_HIST_SIZE;
while (1)
{
cprintf("%d", p_hist[syscall_number].pids[i]);
i = (i + 1) % PROC_HIST_SIZE;
if(i == limit) break;
Expand Down

0 comments on commit ef63db9

Please sign in to comment.