CS318 - Pintos
Pintos source browser for JHU CS318 course
|
Go to the documentation of this file.
18 unsigned char buf[128 * 1024];
23 CHECK ((handle =
open (argv[1])) > 1,
"open \"%s\"", argv[1]);
static char buf[BUF_SIZE]
int write(int fd, const void *buffer, unsigned size)
#define CHECK(SUCCESS,...)
Takes an expression to test for SUCCESS and a message, which may include printf-style arguments.
#define UNUSED
GCC lets us add "attributes" to functions, function parameters, etc.
const char * test_name
Reads a 128 kB file onto the stack and "sorts" the bytes in it, using quick sort, a multi-pass divide...
int open(const char *file)
void qsort_bytes(unsigned char *buf, size_t size)
Sorts the SIZE bytes in BUF into nondecreasing order, using the quick-sort algorithm.
void seek(int fd, unsigned position)
int main(int argc UNUSED, char *argv[])
int read(int fd, void *buffer, unsigned size)