Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2637 → Rev 2638

/trunk/kernel/generic/include/ipc/ipc.h
118,7 → 118,7
*
* The protocol for negotiating is:
* - sys_connect_to_me - sends a message IPC_M_CONNECT_TO_ME
* - sys_wait_for_call - upon receipt tries to allocate new phone
* - recipient - upon receipt tries to allocate new phone
* - if it fails, responds with ELIMIT
* - passes call to userspace. If userspace
* responds with error, phone is deallocated and
126,7 → 126,6
* the call is accepted and the response is sent back.
* - the allocated phoneid is passed to userspace
* (on the receiving side) as ARG5 of the call.
* - the caller obtains taskid of the called thread
*/
#define IPC_M_CONNECT_TO_ME 1
/** Protocol for CONNECT - ME - TO
141,10 → 140,9
* - arg1/2/3 are user specified, arg5 contains
* address of the phone that should be connected
* (TODO: it leaks to userspace)
* recipient - if ipc_answer == 0, then accept connection
* - recipient - if ipc_answer == 0, then accept connection
* - otherwise connection refused
* - recepient may forward message. Forwarding
* system message
* - recepient may forward message.
*
*/
#define IPC_M_CONNECT_ME_TO 2
/trunk/kernel/generic/src/ipc/sysipc.c
184,7 → 184,7
} else {
/* The connection was accepted */
phone_connect(phoneid, &answer->sender->answerbox);
/* Set 'phone hash' as arg3 of response */
/* Set 'phone hash' as arg5 of response */
IPC_SET_ARG5(answer->data,
(unative_t) &TASK->phones[phoneid]);
}
269,7 → 269,7
newphid = phone_alloc();
if (newphid < 0)
return ELIMIT;
/* Set arg3 for server */
/* Set arg5 for server */
IPC_SET_ARG5(call->data, (unative_t) &TASK->phones[newphid]);
call->flags |= IPC_CALL_CONN_ME_TO;
call->priv = newphid;