X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=doc%2Fuserprog.texi;h=9277b087f5d9d9ba30e5a90d20ab8951f9b1284d;hb=1badd625433c705859ee5ea9159728213e3b339f;hp=3473e961ac1aeaa4b163e6a4808429305ead487e;hpb=acbd6759b0d3e5cddfdd651b8f95fad628cf7273;p=pintos-anon diff --git a/doc/userprog.texi b/doc/userprog.texi index 3473e96..9277b08 100644 --- a/doc/userprog.texi +++ b/doc/userprog.texi @@ -129,7 +129,7 @@ system implementation. You need to be able to create and format simulated disks. The @command{pintos} program provides this functionality with its -@option{make-disk} command. From the @file{filesys/build} directory, +@option{make-disk} command. From the @file{userprog/build} directory, execute @code{pintos make-disk fs.dsk 2}. This command creates a 2 MB simulated disk named @file{fs.dsk}. (It does not actually start Pintos.) Then format the disk by passing the @option{-f} option to @@ -273,9 +273,10 @@ called by user programs are prototyped in @file{lib/user/syscall.h}: @table @code @item SYS_halt @itemx void halt (void) -Stops Pintos and prints out performance statistics. Note that this -should be seldom used, since then you lose some information about -possible deadlock situations, etc. +Stops Pintos by calling @func{power_off} (declared in +@file{threads/init.h}). Note that this should be seldom used, since +then you lose some information about possible deadlock situations, +etc. @item SYS_exit @itemx void exit (int @var{status}) @@ -299,8 +300,9 @@ process, the return value is undefined (but kernel operation must not be disrupted). @item SYS_create -@itemx bool create (const char *@var{file}) -Create a new file called @var{file}. Returns -1 if failed, 0 if OK. +@itemx bool create (const char *@var{file}, unsigned @var{initial_size}) +Create a new file called @var{file} initially @var{initial_size} bytes +in size. Returns -1 if failed, 0 if OK. @item SYS_remove @itemx bool remove (const char *@var{file})