Rev 3153 | Rev 3403 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3153 | Rev 3191 | ||
---|---|---|---|
Line 85... | Line 85... | ||
85 | call_t *ipc_call_alloc(int flags) |
85 | call_t *ipc_call_alloc(int flags) |
86 | { |
86 | { |
87 | call_t *call; |
87 | call_t *call; |
88 | 88 | ||
89 | call = slab_alloc(ipc_call_slab, flags); |
89 | call = slab_alloc(ipc_call_slab, flags); |
- | 90 | if (call) |
|
90 | _ipc_call_init(call); |
91 | _ipc_call_init(call); |
91 | 92 | ||
92 | return call; |
93 | return call; |
93 | } |
94 | } |
94 | 95 | ||
95 | /** Initialize a statically allocated call structure. |
96 | /** Initialize a statically allocated call structure. |
Line 158... | Line 159... | ||
158 | * |
159 | * |
159 | * @param phone Phone structure to be initialized. |
160 | * @param phone Phone structure to be initialized. |
160 | */ |
161 | */ |
161 | void ipc_phone_init(phone_t *phone) |
162 | void ipc_phone_init(phone_t *phone) |
162 | { |
163 | { |
163 | mutex_initialize(&phone->lock); |
164 | mutex_initialize(&phone->lock, MUTEX_PASSIVE); |
164 | phone->callee = NULL; |
165 | phone->callee = NULL; |
165 | phone->state = IPC_PHONE_FREE; |
166 | phone->state = IPC_PHONE_FREE; |
166 | atomic_set(&phone->active_calls, 0); |
167 | atomic_set(&phone->active_calls, 0); |
167 | } |
168 | } |
168 | 169 |