Changeset 30c27e9 in mainline


Ignore:
Timestamp:
2017-09-03T19:58:53Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
63d8f43
Parents:
a5d0143
Message:

Improve comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/ipc/ipcrsc.c

    ra5d0143 r30c27e9  
    3939 *
    4040 * The pattern of usage of the resources is:
    41  * - allocate empty phone slot, connect | deallocate slot
     41 * - allocate empty phone capability slot, connect | deallocate slot
    4242 * - disconnect connected phone (some messages might be on the fly)
    4343 * - find phone in slot and send a message using phone
     
    5353 *   atomic on all platforms)
    5454 *
    55  * - To find an empty phone slot, the TASK must be locked
     55 * - To find an empty phone capability slot, the TASK must be locked
    5656 * - To answer a message, the answerbox must be locked
    5757 * - The locking of phone and answerbox is done at the ipc_ level.
     
    7777 *
    7878 * *** Connect_to_me ***
    79  * The caller sends IPC_M_CONNECT_TO_ME. 
     79 * The caller sends IPC_M_CONNECT_TO_ME.
    8080 * 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 new
    83  * connection before getting response for connect_to_me message. Userspace
    84  * should implement handshake protocol 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.
    8585 *
    8686 * Phone hangup
     
    8989 * - The phone is disconnected (no more messages can be sent over this phone),
    9090 *   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  *   calls are 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.
    9393 *
    9494 * *** 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 *
    99100 *
    100101 * Call forwarding
    101102 *
    102  * The call can be forwarded, so that the answer to call is passed directly
    103  * to the original sender. However, this poses special problems regarding
    104  * routing of 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.
    105106 *
    106107 * sys_ipc_hangup -> IPC_M_PHONE_HUNGUP
     
    139140 * @todo Some speedup (hash table?)
    140141 *
    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.
    146146 *
    147147 */
Note: See TracChangeset for help on using the changeset viewer.