PKUOS - Pintos
Pintos source browser for PKU Operating System course
Functions | Variables
child-qsort.c File Reference
#include <debug.h>
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
#include "tests/vm/qsort.h"
Include dependency graph for child-qsort.c:

Go to the source code of this file.

Functions

int main (int argc UNUSED, char *argv[])
 

Variables

const char * test_name = "child-qsort"
 Reads a 128 kB file onto the stack and "sorts" the bytes in it, using quick sort, a multi-pass divide and conquer algorithm. More...
 

Function Documentation

◆ main()

int main ( int argc  UNUSED,
char *  argv[] 
)

Definition at line 15 of file child-qsort.c.

References buf, CHECK, close(), open(), qsort_bytes(), quiet, read(), seek(), and write().

Here is the call graph for this function:

Variable Documentation

◆ test_name

const char* test_name = "child-qsort"

Reads a 128 kB file onto the stack and "sorts" the bytes in it, using quick sort, a multi-pass divide and conquer algorithm.

Child process for syn-read test.

The sorted data is written back to the same file in-place.

Definition at line 12 of file child-qsort.c.