| CS318 - Pintos
    Pintos source browser for JHU CS318 course | 
 
 
 
Go to the documentation of this file.
    8 #include "tests/userprog/sample.inc" 
   18   CHECK ((handle = 
open (
"sample.txt")) > 1, 
"open \"sample.txt\"");
 
   20   snprintf (child_cmd, 
sizeof child_cmd, 
"child-close %d", handle);
 
  
int snprintf(char *buffer, size_t buf_size, const char *format,...)
Like printf(), except that output is stored into BUFFER, which must have space for BUF_SIZE character...
#define CHECK(SUCCESS,...)
Takes an expression to test for SUCCESS and a message, which may include printf-style arguments.
pid_t exec(const char *file)
int open(const char *file)
void test_main(void)
Opens a file and then runs a subprocess that tries to close the file.
static void wait(struct intq *q, struct thread **waiter)
void msg(const char *format,...)
void check_file_handle(int fd, const char *file_name, const void *buf_, size_t size)