TYPES(5)
NAME
types − primitive system data types
USAGE
#include <sys/types.h>
DESCRIPTION
The data types defined in the include file are used in the system code; some data of these types are accessible to user code:
/*types.h6.183/07/29 */
/*
* Basic system types and major/minor device constructing/busting macros.
*/
/* major part of a device */
#definemajor(x)((int)(((unsigned)(x)>>8)&0377))
/* minor part of a device */
#defineminor(x)((int)((x)&0377))
/* make a device number */
#definemakedev(x,y)((dev_t)(((x)<<8) | (y)))
typedefunsigned charu_char;
typedefunsigned shortu_short;
typedefunsigned intu_int;
typedefunsigned longu_long;
typedefunsigned shortushort; /* sys III compat */
#ifdef vax
typedefstruct_physadr { int r[1]; } *physadr;
typedefstructlabel_t {
intval[14];
} label_t;
#endif
typedefstruct_quad { long val[2]; } quad;
typedeflongdaddr_t;
typedefchar *caddr_t;
typedefu_longino_t;
typedeflongswblk_t;
typedefintsize_t;
typedeflongtime_t;
typedeflongdev_t;
typedeflongoff_t;
typedefstructfd_set { int fds_bits[1]; } fd_set;
The form daddr_t is used for disk addresses except in an inode on disk. Times are encoded in seconds since 00:00:00 GMT, January 1, 1970. The major and minor parts of a device code specify kind and unit number of a device and are installation-dependent. Offsets are measured in bytes from the beginning of a file. The label_t variables are used to save the processor state while another process is running.