Changeset 30c27e9 in mainline
- Timestamp:
- 2017-09-03T19:58:53Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 63d8f43
- Parents:
- a5d0143
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/ipcrsc.c
ra5d0143 r30c27e9 39 39 * 40 40 * The pattern of usage of the resources is: 41 * - allocate empty phone slot, connect | deallocate slot41 * - allocate empty phone capability slot, connect | deallocate slot 42 42 * - disconnect connected phone (some messages might be on the fly) 43 43 * - find phone in slot and send a message using phone … … 53 53 * atomic on all platforms) 54 54 * 55 * - To find an empty phone slot, the TASK must be locked55 * - To find an empty phone capability slot, the TASK must be locked 56 56 * - To answer a message, the answerbox must be locked 57 57 * - The locking of phone and answerbox is done at the ipc_ level. … … 77 77 * 78 78 * *** Connect_to_me *** 79 * The caller sends IPC_M_CONNECT_TO_ME. 79 * The caller sends IPC_M_CONNECT_TO_ME. 80 80 * The server receives an automatically opened phoneid. If it accepts 81 * (RETVAL=0), it can use the phoneid immediately. 82 * Possible race condition can arise, when the client receives messages from new83 * connection before getting response for connect_to_me message. Userspace84 * should implement handshakeprotocol that would control it.81 * (RETVAL=0), it can use the phoneid immediately. Possible race condition can 82 * arise, when the client receives messages from new connection before getting 83 * response for connect_to_me message. Userspace should implement handshake 84 * protocol that would control it. 85 85 * 86 86 * Phone hangup … … 89 89 * - The phone is disconnected (no more messages can be sent over this phone), 90 90 * all in-progress messages are correctly handled. The answerbox receives 91 * IPC_M_PHONE_HUNGUP call from the phone that hung up. When all async 92 * callsare answered, the phone is deallocated.91 * IPC_M_PHONE_HUNGUP call from the phone that hung up. When all async calls 92 * are answered, the phone is deallocated. 93 93 * 94 94 * *** The answerbox hangs up (ipc_answer(EHANGUP)) 95 * - The phone is disconnected. EHANGUP response code is sent 96 * to the calling task. All new calls through this phone 97 * get a EHUNGUP error code, the task is expected to 98 * send an sys_ipc_hangup after cleaning up its internal structures. 95 * - The phone is disconnected. EHANGUP response code is sent to the calling 96 * task. All new calls through this phone get a EHUNGUP error code, the task 97 * is expected to send an sys_ipc_hangup after cleaning up its internal 98 * structures. 99 * 99 100 * 100 101 * Call forwarding 101 102 * 102 * The call can be forwarded, so that the answer to call is passed directly 103 * t o the original sender. However, this poses special problems regarding104 * routingof hangup messages.103 * The call can be forwarded, so that the answer to call is passed directly to 104 * the original sender. However, this poses special problems regarding routing 105 * of hangup messages. 105 106 * 106 107 * sys_ipc_hangup -> IPC_M_PHONE_HUNGUP … … 139 140 * @todo Some speedup (hash table?) 140 141 * 141 * @param callid Userspace hash of the call. Currently it is the call 142 * structure kernel address. 143 * 144 * @return NULL on not found, otherwise pointer to the call 145 * structure. 142 * @param callid Userspace hash of the call. Currently it is the call structure 143 * kernel address. 144 * 145 * @return NULL on not found, otherwise pointer to the call structure. 146 146 * 147 147 */
Note:
See TracChangeset
for help on using the changeset viewer.