/* * Copyright 1990-1995 Silicon Graphics, Inc. * All Rights Reserved. * * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.; * the contents of this file may not be disclosed to third parties, copied or * duplicated in any form, in whole or in part, without the prior written * permission of Silicon Graphics, Inc. * * RESTRICTED RIGHTS LEGEND: * Use, duplication or disclosure by the Government is subject to restrictions * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data * and Computer Software clause at DFARS 252.227-7013, and/or in similar or * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished - * rights reserved under the Copyright Laws of the United States. */ /* Copyright (c) 1984 AT&T */ /* All Rights Reserved */ /* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */ /* The copyright notice above does not evidence any */ /* actual or intended publication of such source code. */ #ifndef _SYS_TYPES_H #define _SYS_TYPES_H #ident "$Revision: 3.147 $" #include #include #include /* POSIX Extensions */ typedef unsigned char uchar_t; typedef unsigned short ushort_t; typedef unsigned int uint_t; typedef unsigned long ulong_t; /* POSIX Threads */ #if (_POSIX1C || _XOPEN5) #include #endif /* _POSIX1C */ #if _XOPEN5 typedef long blksize_t; typedef long suseconds_t; #if (_MIPS_SZLONG == 32) typedef long xtiscalar_t; typedef unsigned long xtiuscalar_t; #endif #if (_MIPS_SZLONG == 64) typedef int xtiscalar_t; typedef unsigned int xtiuscalar_t; #endif typedef xtiscalar_t t_scalar_t; typedef xtiuscalar_t t_uscalar_t; #endif /* _XOPEN5 */ /* Primarily Kernel types */ typedef char * addr_t; /* ? type */ typedef char * caddr_t; /* ? type */ #if (_MIPS_SIM == _ABIN32) typedef __int64_t daddr_t; /* type */ #else typedef long daddr_t; /* type */ #endif typedef long pgno_t; /* virtual page number type */ typedef __uint32_t pfn_t; /* physical page number type */ typedef short cnt_t; /* type */ typedef unsigned long basictime_t; typedef __int64_t micro_t; /* The "page count" types can be restricted to 32-bits since that * is sufficient to support 44 bit addressing (4K pages) or 46 bit addressing * (with 16K pages). */ typedef __int32_t pgcnt_t; /* page count type */ #if _NO_POSIX && _NO_XOPEN4 && _NO_XOPEN5 typedef enum { B_FALSE, B_TRUE } boolean_t; #endif /* * The following type is for various kinds of identifiers. The * actual type must be the same for all since some system calls * (such as sigsend) take arguments that may be any of these * types. The enumeration type idtype_t defined in sys/procset.h * is used to indicate what type of id is being specified. */ #if (_MIPS_SZLONG == 32) typedef long id_t; /* A process id, */ /* process group id, */ /* session id, */ /* scheduling class id, */ /* user id, or group id.*/ #endif #if (_MIPS_SZLONG == 64) typedef __int32_t id_t; #endif /* Typedefs for dev_t components */ #if (_MIPS_SZLONG == 32) typedef ulong_t major_t; /* major part of device number */ typedef ulong_t minor_t; /* minor part of device number */ #endif #if (_MIPS_SZLONG == 64) typedef __uint32_t major_t; /* major part of device number */ typedef __uint32_t minor_t; /* minor part of device number */ #endif /* * For compatilbility reasons the following typedefs (prefixed o_) * can't grow regardless of the EFT definition. Although, * applications should not explicitly use these typedefs * they may be included via a system header definition. * WARNING: These typedefs may be removed in a future * release. * ex. the definitions in s5inode.h remain small * to preserve compatibility in the S5 * file system type. */ typedef ushort_t o_mode_t; /* old file attribute type */ typedef short o_dev_t; /* old device type */ typedef ushort_t o_uid_t; /* old UID type */ typedef o_uid_t o_gid_t; /* old GID type */ typedef short o_nlink_t; /* old file link type */ typedef short o_pid_t; /* old process id type */ typedef __uint32_t o_ino_t; /* old inode type */ #if (_MIPS_SZLONG == 32) typedef unsigned long mode_t; /* file attrs */ typedef unsigned long dev_t; /* device type */ typedef long uid_t; typedef long gid_t; typedef unsigned long nlink_t; /* used for link counts */ typedef long pid_t; /* proc & grp IDs */ #endif #if (_MIPS_SZLONG == 64) typedef __uint32_t mode_t; /* file attrs */ typedef __uint32_t dev_t; /* device type */ typedef __int32_t uid_t; typedef __int32_t gid_t; typedef __uint32_t nlink_t; /* used for link counts */ typedef __int32_t pid_t; /* proc & grp IDs */ #endif typedef int tid_t; /* thread IDs */ typedef dev_t vertex_hdl_t; /* hardware graph vertex handle */ #if (defined(_KERNEL) || (_MIPS_SIM == _ABIN32)) && !defined(_STANDALONE) typedef __uint64_t ino_t; /* type */ #else typedef unsigned long ino_t; /* type */ #endif typedef __uint64_t ino64_t; /* bit inode number type */ #ifndef _OFF_T #define _OFF_T #if defined(_KERNEL) && !defined(_STANDALONE) typedef __int64_t off_t; /* byte offset type */ #elif defined(_STANDALONE) typedef long off_t; /* byte offset type */ #elif _MIPS_SIM == _ABIN32 typedef __int64_t off_t; /* byte offset type */ #else typedef long off_t; /* byte offset type */ #endif #endif /* OFF_T */ #ifndef _OFF64_T #define _OFF64_T typedef __int64_t off64_t; /* big byte offset type */ #endif /* !_OFF64_T */ typedef __scint_t __scoff_t; /* scaling off_t */ #if defined(_KERNEL) || (_NO_XOPEN4 && _NO_XOPEN5 && _NO_POSIX) typedef __scoff_t scoff_t; /* kernel scaling off_t */ #endif #if _LFAPI /* additions for Large File Access */ typedef __int64_t blkcnt64_t; typedef __uint64_t fsblkcnt64_t; typedef __uint64_t fsfilcnt64_t; #endif /* _LFAPI */ #if ((_MIPS_SIM == _ABIN32) || defined(_KERNEL)) typedef __int64_t blkcnt_t; /* blocks in a file */ typedef __uint64_t fsblkcnt_t; /* blocks in a filesystem */ typedef __uint64_t fsfilcnt_t; /* files in a filesystem */ #else typedef long blkcnt_t; /* blocks in a file */ typedef ulong_t fsblkcnt_t; /* blocks in a filesystem */ typedef ulong_t fsfilcnt_t; /* files in a filesystem */ #endif typedef long swblk_t; typedef unsigned long paddr_t; /* type */ typedef unsigned long iopaddr_t; /* type */ typedef int key_t; /* IPC key type */ typedef unsigned char use_t; /* use count for swap. */ typedef long sysid_t; typedef short index_t; typedef signed short nasid_t; /* node id in numa-as-id space */ typedef signed short cnodeid_t; /* node id in compact-id space */ typedef signed char partid_t; /* partition ID type */ typedef signed short moduleid_t; /* user-visible module number type */ typedef signed short cmoduleid_t; /* kernel compact module id type */ typedef uchar_t clusterid_t; /* Clusterid of the cell */ typedef unsigned int lock_t; /* type for splock{spl} */ typedef signed short cpuid_t; /* cpuid */ typedef unsigned char pri_t; /* sheduler priority */ typedef __uint64_t accum_t; /* accounting accumulator */ typedef __int64_t prid_t; /* project ID */ typedef __int64_t ash_t; /* array session handle */ typedef short cell_t; /* cell ID */ typedef int credid_t; /* credential id */ typedef __int64_t jid_t; /* job ID */ typedef __int32_t ncpus_t; typedef __uint64_t id_type_t; __SGI_LIBC_BEGIN_NAMESPACE_STD #if !defined(_SIZE_T) && !defined(_SIZE_T_) #define _SIZE_T #if (_MIPS_SZLONG == 32) typedef unsigned int size_t; #endif #if (_MIPS_SZLONG == 64) typedef unsigned long size_t; #endif #endif /* !_SIZE_T */ __SGI_LIBC_END_NAMESPACE_STD __SGI_LIBC_USING_FROM_STD(size_t) #ifndef _SSIZE_T #define _SSIZE_T #if (_MIPS_SZLONG == 32) typedef int ssize_t; #endif #if (_MIPS_SZLONG == 64) typedef long ssize_t; #endif #endif __SGI_LIBC_BEGIN_NAMESPACE_STD #ifndef _TIME_T #define _TIME_T #if _MIPS_SZLONG == 32 typedef long time_t; /*