|
|
1.1 ! root 1: ! 2: ! 3: shmctl() COHERENT System Call shmctl() ! 4: ! 5: ! 6: ! 7: ! 8: Control shared-memory operations ! 9: ! 10: #include <sys/shm.h> ! 11: sshhmmccttll(_s_h_m_i_d, _c_m_d, _b_u_f) ! 12: iinntt _s_h_m_i_d, _c_m_d; ssttrruucctt sshhmmiidd_ddss *_b_u_f; ! 13: ! 14: shmctl provides controls the COHERENT system's shared-memory ! 15: facility. cmd specifies the operation to perform, as follows: ! 16: ! 17: IIPPCC_SSTTAATT Place the current value of each member of the data ! 18: structure associated with shmid into the structure ! 19: pointed to by buf. ! 20: ! 21: IIPPCC_SSEETT Set the value of the following members of the data ! 22: structure associated with shmid to the corresponding ! 23: value found in the structure pointed to by buf: ! 24: ! 25: shm_perm.uid ! 26: shm_perm.gid ! 27: shm_perm.mode /* only low 9 bits */ ! 28: ! 29: This cmd can be executed only by a process whose ef- ! 30: fective user ID equals either that of the superuser or ! 31: shm_perm.uid in the data structure associated with ! 32: shmid. ! 33: ! 34: IIPPCC_RRMMIIDD Remove the system identifier specified by shmid from ! 35: the system and destroy the shared memory segment and ! 36: data structure associated with it. This cmd can be ex- ! 37: ecuted only by a process whose effective user ID equalS ! 38: either that of the superuser or shm_perm.uid in the ! 39: data structure associated with shmid. ! 40: ! 41: shmctl fails if any of the following is true: ! 42: ! 43: * shmid is not a valid shared memory identifier shmget sets er- ! 44: rno to EEIINNVVAALL. ! 45: ! 46: * cmd is not a valid command (EEIINNVVAALL). ! 47: ! 48: * cmd equals IPC_STAT and operation permission is denied to the ! 49: calling process (EEAACCCCEESS). ! 50: ! 51: * cmd equals IPC_RMID or IPC_SET and the effective user iden- ! 52: tifier of the calling process does equals neither that of the ! 53: superuser nor shm_perm.uid in the data structure associated ! 54: with shmid (EEPPEERRMM). ! 55: ! 56: * buf points to an illegal address (EEFFAAUULLTT). ! 57: ! 58: ***** Return Value ***** ! 59: ! 60: Upon successful completion, shmctl returns zero; otherwise, it ! 61: returns -1 and sets errno to an appropriate value. ! 62: ! 63: ! 64: COHERENT Lexicon Page 1 ! 65: ! 66: ! 67: ! 68: ! 69: shmctl() COHERENT System Call shmctl() ! 70: ! 71: ! 72: ! 73: ! 74: ***** Files ***** ! 75: ! 76: /usr/include/sys/ipc.h ! 77: /usr/include/sys/shm.h ! 78: /dev/shm ! 79: /drv/shm ! 80: ! 81: ***** See Also ***** ! 82: ! 83: COHERENT system calls, shm, shmget() ! 84: ! 85: ***** Notes ***** ! 86: ! 87: To improve portability, the COHERENT system implements its ! 88: shared-memory functions as a device driver instead of as an ac- ! 89: tual system call. ! 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.