Changeset aadde10 in mainline


Ignore:
Timestamp:
2018-03-13T18:01:48Z (6 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a36f442
Parents:
fce9b19
git-author:
Jakub Jermar <jakub@…> (2018-03-11 10:46:02)
git-committer:
Jakub Jermar <jakub@…> (2018-03-13 18:01:48)
Message:

Update comment on IPC resource management

File:
1 edited

Legend:

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

    rfce9b19 raadde10  
    3939 *
    4040 * The pattern of usage of the resources is:
    41  * - allocate empty phone capability slot, connect | deallocate slot
     41 * - allocate a capability and phone kernel object (do not publish yet),
     42 *   connect to the answerbox, and finally publish the capability
    4243 * - disconnect connected phone (some messages might be on the fly)
    43  * - find phone in slot and send a message using phone
     44 * - find phone capability and send a message using phone
    4445 * - answer message to phone
    4546 * - hangup phone (the caller has hung up)
     
    5354 *   atomic on all platforms)
    5455 *
    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.
     
    7373 * *** Connect_me_to ***
    7474 * The caller sends IPC_M_CONNECT_ME_TO to an answerbox. The server receives
    75  * 'phoneid' of the connecting phone as an ARG5. If it answers with RETVAL=0,
    76  * the phonecall is accepted, otherwise it is refused.
     75 * 'phoneid' of the connecting phone as an ARG5. If it answers with RETVAL=EOK,
     76 * the phone call is accepted, otherwise it is refused.
    7777 *
    7878 * *** Connect_to_me ***
    7979 * 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. Possible race condition can
     81 * (RETVAL=EOK), it can use the phoneid immediately. Possible race condition can
    8282 * arise, when the client receives messages from new connection before getting
    8383 * response for connect_to_me message. Userspace should implement handshake
     
    9595 * - The phone is disconnected. EHANGUP response code is sent to the calling
    9696 *   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
     97 *   is expected to call sys_ipc_hangup after cleaning up its internal
    9898 *   structures.
    9999 *
Note: See TracChangeset for help on using the changeset viewer.