Permalink
Browse files

53

  • Loading branch information...
1 parent 33196f3 commit dbe0a44654d0fee5a63ced21b21db6ddeec3cf49 @grantborthwick committed Nov 1, 2012
Showing with 8 additions and 3 deletions.
  1. +8 −3 src/userprog/process.c
@@ -527,9 +527,14 @@ load_segment (struct file *file, off_t ofs, uint8_t *upage,
static void
reverse (int argc, char **argv)
{
- /* add code */
-
- return;
+ int i;
+ char* temp;
+ for(i=0;i<argc/2;++i){
+ temp = argv[argc-1-i];
+ argv[argc-1-i] = argv[i];
+ argv[i] = temp;
+ }
+ return;
}
/* Pushes the SIZE bytes in BUF onto the stack in KPAGE, whose

0 comments on commit dbe0a44

Please sign in to comment.