|
|
1.1 ! root 1: ! 2: ! 3: sem Device Driver sem ! 4: ! 5: ! 6: ! 7: ! 8: Semaphore device driver ! 9: ! 10: ! 11: /dev/sem is an interface to the semaphore device driver. It is ! 12: assigned major device 23 (minor device 0) and can be accessed as ! 13: a character-special device. ! 14: ! 15: All semaphore operations are performed through the COHERENT sys- ! 16: tem call ioctl. The operations semctl, semget, and semop are ! 17: performed with an integer parameter array. The first element of ! 18: the array is reserved for the return value (default -1). Subse- ! 19: quent elements represent arguments. The call to ioctl passes ! 20: SEMCTL, SEMGET, or SEMOP as the second argument, and the ! 21: parameter array as the third argument. The first argument is an ! 22: open file descriptor to /dev/sem. ! 23: ! 24: ***** Access ***** ! 25: ! 26: Prior to accessing the devices, a entry must be created in /dev, ! 27: as follows: ! 28: ! 29: ! 30: /etc/mknod /dev/sem c 23 0 ! 31: chmod 666 /dev/sem ! 32: ! 33: ! 34: ***** Bugs ***** Allocation of too many semaphore ids (NNSSEEMMIIDD) or ! 35: semaphores per identifier (NNSSEEMM) can exhaust kernel data space, ! 36: which will stop the system in its tracks. ! 37: ! 38: Private semaphore sets are not supported. Semaphore ids must be ! 39: removed manually when no longer required. To remove all ! 40: semaphore identifiers, use the following code: ! 41: ! 42: ! 43: #include <sys/sem.h> ! 44: #define NSEMID 16 ! 45: ! 46: semget( 0, 0 ); /* must do first */ ! 47: ! 48: for ( id=0; id < NSEMID; ++id ) ! 49: semctl( id, 0, IPC_RMID, 0 ); ! 50: ! 51: ! 52: To load the driver sem into memory, use the command drvld. ! 53: ! 54: ***** Files ***** ! 55: ! 56: /uussrr/iinncclluuddee/ssyyss/iippcc.hh ! 57: /uussrr/iinncclluuddee/ssyyss/sseemm.hh ! 58: /ddeevv/sseemm -- Device ! 59: /ddrrvv/sseemm -- Loadable device driver ! 60: ! 61: ! 62: ! 63: ! 64: COHERENT Lexicon Page 1 ! 65: ! 66: ! 67: ! 68: ! 69: sem Device Driver sem ! 70: ! 71: ! 72: ! 73: ***** See Also ***** ! 74: ! 75: device drivers, drvld, semctl(), semget(), semop() ! 76: ! 77: ! 78: ! 79: ! 80: ! 81: ! 82: ! 83: ! 84: ! 85: ! 86: ! 87: ! 88: ! 89: ! 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.