Added close, read and write system calls.
authorThadeu Lima de Souza Cascardo <cascardo@minaslivre.org>
Wed, 7 May 2008 11:47:41 +0000 (08:47 -0300)
committerThadeu Lima de Souza Cascardo <cascardo@minaslivre.org>
Wed, 7 May 2008 11:47:41 +0000 (08:47 -0300)
_ldd.xml

index 2b20507..47ebedf 100644 (file)
--- a/_ldd.xml
+++ b/_ldd.xml
@@ -86,4 +86,62 @@ fd = open ("/dev/ttyS0", O\_RDWR);
 </para>
 </foil>
 
+<foil>
+<title>close</title>
+<para>
+The close system call closes an open file.
+</para>
+<para>
+int close (int fd);
+</para>
+<para>
+Example:
+</para>
+<para>
+close (fd);
+</para>
+</foil>
+
+<foil>
+<title>read</title>
+<para>
+The read system call reads data from an open file into a buffer. For
+devices, it reads from the device.
+</para>
+<para>
+int read (int fd, char *buffer, int bsz);
+</para>
+<para>
+Read returns the number of bytes written into the buffer, which may be
+less than the number of bytes requested for any number of reasons.
+</para>
+<para>
+Example:
+</para>
+<para>
+c = read (fd, buffer, sizeof (buffer));
+</para>
+</foil>
+
+<foil>
+<title>write</title>
+<para>
+The write system call writes data to an open file from a buffer. For
+devices, it writes to the device.
+</para>
+<para>
+int write (int fd, char *buffer, int bsz);
+</para>
+<para>
+Write returns the number of bytes written to the file, which may be
+less than the number of bytes requested for any number of reasons.
+</para>
+<para>
+Example:
+</para>
+<para>
+c = write (fd, buffer, strlen (buffer));
+</para>
+</foil>
+
 </slides>