|
|
1.1 ! root 1: ! 2: ! 3: msg Device Driver msg ! 4: ! 5: ! 6: ! 7: ! 8: Message device driver ! 9: ! 10: ! 11: The file /dev/msg is an interface to the message device driver. ! 12: It is assigned major device 25 (minor device 0) and can be ac- ! 13: cessed as a character-special device. ! 14: ! 15: All messaging operations are performed through the COHERENT sys- ! 16: tem call ioctl. Each of the operations msgctl, msgget, msgsnd, ! 17: and msgrcv is performed with an integer array as its parameter. ! 18: The first element of the array is reserved for the return value ! 19: (default, -1). Subsequent elements represent arguments. The ! 20: call to ioctl passes MSGCTL, MSGGET, MSGSND, or MSGRCV as the ! 21: second argument, and an array of parameters as the third argu- ! 22: ment. The first argument is an open file descriptor to /dev/msg. ! 23: ! 24: Prior to accessing the devices, a entry must be created in direc- ! 25: tory /dev, as follows: ! 26: ! 27: ! 28: /etc/mknod /dev/msg c 25 0 ! 29: /bin/chmod 444 /dev/msg ! 30: ! 31: ! 32: ***** Notes ***** ! 33: ! 34: The total space allocated for message text (NNMMSSGG * NNMMSSCC) must be ! 35: less than 64 kilobytes. ! 36: ! 37: Allocation of too many message queues (NNMMSSQQIIDD) or messages (NNMMSSGG) ! 38: can exhaust kernel data space, thus preventing the system from ! 39: running. Recommended safe limits are NNMMSSQQIIDD=16 and NNMMSSGG=100. ! 40: ! 41: Private message queues are not supported. Message queues must be ! 42: removed manually when no longer required. Queue identifiers con- ! 43: sist of a scaled slot number plus a slot usage sequence number. ! 44: Using the system call msgctl with the option IPC_STAT will obtain ! 45: information on the specified slot, even when it returns an error. ! 46: ! 47: To remove all message queues, compile and run the following C ! 48: code: ! 49: ! 50: ! 51: msgget( 0, 0 ); /* must do first */ ! 52: ! 53: ! 54: ! 55: for ( qid = 0x100; qid < 0x4000; qid += 0x100 ) { ! 56: struct msqid_ds msb; ! 57: msb.msg_perm.seq = 0; ! 58: msgctl( qid, IPC_STAT, &msb ); ! 59: ! 60: ! 61: ! 62: ! 63: ! 64: COHERENT Lexicon Page 1 ! 65: ! 66: ! 67: ! 68: ! 69: msg Device Driver msg ! 70: ! 71: ! 72: ! 73: ! 74: if ( msb.msg_perm.seq > 0 ) ! 75: msgctl (msb.msg_perm.seq, IPC_RMID, 0 ); ! 76: } ! 77: ! 78: ! 79: To load msg use the command drvld. ! 80: ! 81: ***** Files ***** ! 82: ! 83: /usr/include/sys/ipc.h ! 84: /usr/include/sys/msg.h ! 85: /dev/msg ! 86: ! 87: ***** See Also ***** ! 88: ! 89: device drivers, drvld, msgctl(), msgget(), msgop() ! 90: ! 91: ! 92: ! 93: ! 94: ! 95: ! 96: ! 97: ! 98: ! 99: ! 100: ! 101: ! 102: ! 103: ! 104: ! 105: ! 106: ! 107: ! 108: ! 109: ! 110: ! 111: ! 112: ! 113: ! 114: ! 115: ! 116: ! 117: ! 118: ! 119: ! 120: ! 121: ! 122: ! 123: ! 124: ! 125: ! 126: ! 127: ! 128: ! 129: ! 130: COHERENT Lexicon Page 2 ! 131: ! 132:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.