Annotation of ntddk/src/network/streams/inc/sys/sysmacro.h, revision 1.1.1.1

1.1       root        1: /*++
                      2: 
                      3: Copyright (c) 1991  Microsoft Corporation
                      4: 
                      5: Module Name:
                      6: 
                      7:    sysmacro.h
                      8: 
                      9: Abstract:
                     10: 
                     11:    This header file defines the device number macros for STREAMS drivers
                     12:    and modules.  It is derived from the SpiderSTREAMS source, sysmacros.h.
                     13: 
                     14: Author:
                     15: 
                     16:    Eric Chin            November 1, 1991
                     17: 
                     18: Revision History:
                     19: 
                     20: --*/
                     21: 
                     22: /* @(#)sysmacros.h     1.3 (Spider) 91/07/01 */
                     23: 
                     24: #ifndef _SYSMACRO_
                     25: #define _SYSMACRO_
                     26: 
                     27: 
                     28: 
                     29: /*
                     30:  * Selectors and Constructor for Device Numbers
                     31:  *
                     32:  * On NT, dev_t is an unsigned long, not an unsigned short (ref:
                     33:  * \nt\public\sdk\inc\sys\posix\sys\types.h).  Hence, minor device
                     34:  * numbers are defined to be 16 bits wide, giving 65536 possible
                     35:  * minor device numbers.
                     36:  *
                     37:  */
                     38: #define major(x)            (int) ((unsigned) (x) >> 16)
                     39: #define minor(x)            (int) ((x) & 0xffff)
                     40: #define makedev(x, y)       (dev_t) (((x) << 16) | (y))
                     41: 
                     42: #define getmajor(x)         major((x))
                     43: #define getminor(x)         minor((x))
                     44: #define makedevice(x, y)    makedev((x), (y))
                     45: 
                     46: #define CLONEDEV            0xffff
                     47: 
                     48: 
                     49: #ifndef min
                     50: #define min(a, b)           ((a) > (b) ? (b) : (a))
                     51: #endif
                     52: 
                     53: #ifndef max
                     54: #define max(a, b)           ((a) < (b) ? (b) : (a))
                     55: #endif
                     56: 
                     57: #endif // _SYSMACRO_

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.