/servers/pfs/const.h

http://www.minix3.org/ · C++ Header · 42 lines · 23 code · 11 blank · 8 comment · 0 complexity · 77883ff07ec45754a8abc27b177a6036 MD5 · raw file

  1. #ifndef __PFS_CONST_H__
  2. #define __PFS_CONST_H__
  3. #define NR_INODES 256 /* # slots in "in core" inode table */
  4. /* Size of descriptor table for unix domain sockets. This should be
  5. * equal to the maximum number of minor devices (currently 256).
  6. */
  7. #define NR_FDS 256
  8. #define INODE_HASH_LOG2 7 /* 2 based logarithm of the inode hash size */
  9. #define INODE_HASH_SIZE ((unsigned long)1<<INODE_HASH_LOG2)
  10. #define INODE_HASH_MASK (((unsigned long)1<<INODE_HASH_LOG2)-1)
  11. /* The type of sizeof may be (unsigned) long. Use the following macro for
  12. * taking the sizes of small objects so that there are no surprises like
  13. * (small) long constants being passed to routines expecting an int.
  14. */
  15. #define usizeof(t) ((unsigned) sizeof(t))
  16. /* Miscellaneous constants */
  17. #define INVAL_UID ((uid_t) -1) /* Invalid user ID */
  18. #define INVAL_GID ((gid_t) -1) /* Invalid group ID */
  19. #define NORMAL 0 /* forces get_block to do disk read */
  20. #define NO_READ 1 /* prevents get_block from doing disk read */
  21. #define PREFETCH 2 /* tells get_block not to read or mark dev */
  22. #define NO_BIT ((bit_t) 0) /* returned by alloc_bit() to signal failure */
  23. #define ATIME 002 /* set if atime field needs updating */
  24. #define CTIME 004 /* set if ctime field needs updating */
  25. #define MTIME 010 /* set if mtime field needs updating */
  26. #define FS_BITMAP_CHUNKS(b) ((b)/usizeof (bitchunk_t))/* # map chunks/blk */
  27. #define FS_BITCHUNK_BITS (usizeof(bitchunk_t) * CHAR_BIT)
  28. #define FS_BITS_PER_BLOCK(b) (FS_BITMAP_CHUNKS(b) * FS_BITCHUNK_BITS)
  29. #define FS_CALL_VEC_SIZE 31
  30. #define DEV_CALL_VEC_SIZE 25
  31. #endif