Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

OS.H

Go to the documentation of this file.
00001 // Copyright (C) 2001, Compaq Computer Corporation
00002 
00003 // This file is part of Vesta.
00004 
00005 // Vesta is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU Lesser General Public
00007 // License as published by the Free Software Foundation; either
00008 // version 2.1 of the License, or (at your option) any later version.
00009 
00010 // Vesta is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 // Lesser General Public License for more details.
00014 
00015 // You should have received a copy of the GNU Lesser General Public
00016 // License along with Vesta; if not, write to the Free Software
00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 
00019 // Last modified on Sat May 28 17:07:17 EDT 2005 by ken@xorian.net
00020 //      modified on Fri Oct 18 10:18:57 PDT 1996 by heydon
00021 //      modified on Tue Aug  8 09:40:13 PDT 1995 by levin
00022 
00023 //  ******************************
00024 //  *  Combined "OS" interfaces  *
00025 //  ******************************
00026 
00027 
00028 //  This header file collects together all the bits and pieces of
00029 //  the Unix kernel interface.
00030 
00031 #ifndef _OS
00032 #define _OS
00033 
00034 //  Basic stuff
00035 
00036 #include <sys/types.h>
00037 #include <errno.h>
00038 
00039 //  System calls
00040 
00041 #include <unistd.h>
00042 #include <sys/param.h>
00043 
00044 //  File system
00045 
00046 #include <fcntl.h>
00047 #include <sys/stat.h>
00048 #include <sys/mount.h>
00049 
00050 //  Process control
00051 
00052 #include <sys/wait.h>
00053 
00054 //  Timing
00055 
00056 #include <sys/time.h>
00057 
00058 //  Interprocess communication
00059 
00060 #include <sys/ioctl.h>
00061 
00062 #include <sys/socket.h>
00063   // generic socket declarations
00064 #include <netinet/in.h>
00065   // internet-specific declarations
00066 #include <arpa/inet.h>
00067   // internet-specific declarations
00068 
00069 Text inet_ntoa_r(in_addr &in);
00070   // Re-entrant version of inet_ntoa
00071 
00072 
00073 typedef int fd_t;
00074 
00075 const fd_t NO_FD = -1;
00076 const fd_t no_fd = NO_FD;
00077 
00078 const int SYSOK = 0;
00079 const int SYSERROR = -1;
00080 
00081 namespace OS
00082 {
00083   // Get the total memory size and resident set size of the calling
00084   // process.  Intended for use by long-running servers to report on
00085   // their memory usage.
00086   void GetProcessSize(/*OUT*/ unsigned long &total,
00087                       /*OUT*/ unsigned long &resident) throw();
00088 
00089   // Set an environmnet variable.
00090   void setenv(const Text &var, const Text &val) throw();
00091 }
00092 
00093 #endif  /* _OS */

Generated on Mon May 8 00:48:30 2006 for Vesta by  doxygen 1.4.2