Rev 1417 | Rev 1434 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1417 | Rev 1428 | ||
---|---|---|---|
Line 62... | Line 62... | ||
62 | * - some system messages may be forwarded, for some of them |
62 | * - some system messages may be forwarded, for some of them |
63 | * it is useless |
63 | * it is useless |
64 | */ |
64 | */ |
65 | static inline int is_forwardable(__native method) |
65 | static inline int is_forwardable(__native method) |
66 | { |
66 | { |
67 | if (method == IPC_M_PHONE_HUNGUP || method == IPC_M_AS_AREA_SEND) |
67 | if (method == IPC_M_PHONE_HUNGUP || method == IPC_M_AS_AREA_SEND \ |
- | 68 | || method == IPC_M_AS_AREA_RECV) |
|
68 | return 0; /* This message is meant only for the receiver */ |
69 | return 0; /* This message is meant only for the receiver */ |
69 | return 1; |
70 | return 1; |
70 | } |
71 | } |
71 | 72 | ||
72 | /****************************************************/ |
73 | /****************************************************/ |
Line 83... | Line 84... | ||
83 | return 1; |
84 | return 1; |
84 | if (IPC_GET_METHOD(call->data) == IPC_M_CONNECT_ME_TO) |
85 | if (IPC_GET_METHOD(call->data) == IPC_M_CONNECT_ME_TO) |
85 | return 1; |
86 | return 1; |
86 | if (IPC_GET_METHOD(call->data) == IPC_M_AS_AREA_SEND) |
87 | if (IPC_GET_METHOD(call->data) == IPC_M_AS_AREA_SEND) |
87 | return 1; |
88 | return 1; |
- | 89 | if (IPC_GET_METHOD(call->data) == IPC_M_AS_AREA_RECV) |
|
- | 90 | return 1; |
|
88 | return 0; |
91 | return 0; |
89 | } |
92 | } |
90 | 93 | ||
91 | /** Interpret process answer as control information */ |
94 | /** Interpret process answer as control information |
- | 95 | * |
|
- | 96 | * This function is called directly after sys_ipc_answer |
|
- | 97 | */ |
|
92 | static inline int answer_preprocess(call_t *answer, ipc_data_t *olddata) |
98 | static inline int answer_preprocess(call_t *answer, ipc_data_t *olddata) |
93 | { |
99 | { |
94 | int phoneid; |
100 | int phoneid; |
95 | 101 | ||
96 | if (IPC_GET_RETVAL(answer->data) == EHANGUP) { |
102 | if (IPC_GET_RETVAL(answer->data) == EHANGUP) { |
Line 137... | Line 143... | ||
137 | as = answer->sender->as; |
143 | as = answer->sender->as; |
138 | spinlock_unlock(&answer->sender->lock); |
144 | spinlock_unlock(&answer->sender->lock); |
139 | interrupts_restore(ipl); |
145 | interrupts_restore(ipl); |
140 | 146 | ||
141 | return as_area_share(as, IPC_GET_ARG1(*olddata), IPC_GET_ARG2(*olddata), |
147 | return as_area_share(as, IPC_GET_ARG1(*olddata), IPC_GET_ARG2(*olddata), |
142 | IPC_GET_ARG1(answer->data), IPC_GET_ARG3(*olddata)); |
148 | AS, IPC_GET_ARG1(answer->data), IPC_GET_ARG3(*olddata)); |
- | 149 | } |
|
- | 150 | } else if (IPC_GET_METHOD(*olddata) == IPC_M_AS_AREA_RECV) { |
|
- | 151 | if (!IPC_GET_RETVAL(answer->data)) { |
|
- | 152 | ipl_t ipl; |
|
- | 153 | as_t *as; |
|
- | 154 | ||
- | 155 | ipl = interrupts_disable(); |
|
- | 156 | spinlock_lock(&answer->sender->lock); |
|
- | 157 | as = answer->sender->as; |
|
- | 158 | spinlock_unlock(&answer->sender->lock); |
|
- | 159 | interrupts_restore(ipl); |
|
- | 160 | ||
- | 161 | return as_area_share(AS, IPC_GET_ARG1(answer->data), IPC_GET_ARG2(*olddata), |
|
- | 162 | as, IPC_GET_ARG1(*olddata), IPC_GET_ARG3(*olddata)); |
|
143 | } |
163 | } |
144 | } |
164 | } |
145 | return 0; |
165 | return 0; |
146 | } |
166 | } |
147 | 167 |