Lines Matching refs:reply
64 #define UNDReply_lock(reply) lck_mtx_lock(&reply->lock)
65 #define UNDReply_unlock(reply) lck_mtx_lock(&reply->lock)
69 UNDReplyRef reply);
74 UNDReplyRef reply)
78 UNDReply_lock(reply);
79 port = reply->self_port;
82 reply->self_port = IP_NULL;
83 UNDReply_unlock(reply);
86 kfree(reply, sizeof(struct UNDReply));
115 UNDReplyRef reply,
131 if (reply == UND_REPLY_NULL || !reply->inprogress)
150 if (reply->callback) {
151 (reply->callback)((int)(KUNCUserNotificationID)reply, result, dict);
154 UNDReply_lock(reply);
155 reply->inprogress = FALSE;
156 reply->userLandNotificationKey = -1;
157 UNDReply_unlock(reply);
158 UNDReply_deallocate(reply);
172 UNDReplyRef reply,
175 if (reply == UND_REPLY_NULL)
178 UNDReply_lock(reply);
179 if (reply->inprogress || reply->userLandNotificationKey != -1) {
180 UNDReply_unlock(reply);
183 reply->userLandNotificationKey = userLandNotificationKey;
184 UNDReply_unlock(reply);
197 UNDReplyRef reply;
199 reply = (UNDReplyRef) kalloc(sizeof(struct UNDReply));
200 if (reply != UND_REPLY_NULL) {
201 reply->self_port = ipc_port_alloc_kernel();
202 if (reply->self_port == IP_NULL) {
203 kfree(reply, sizeof(struct UNDReply));
204 reply = UND_REPLY_NULL;
206 lck_mtx_init(&reply->lock, &LockCompatGroup, LCK_ATTR_NULL);
207 reply->userLandNotificationKey = -1;
208 reply->inprogress = FALSE;
209 ipc_kobject_set(reply->self_port,
210 (ipc_kobject_t)reply,
214 return (KUNCUserNotificationID) reply;
236 UNDReplyRef reply = (UNDReplyRef)id;
240 if (reply == UND_REPLY_NULL)
243 UNDReply_lock(reply);
244 if (!reply->inprogress) {
245 UNDReply_unlock(reply);
249 reply->inprogress = FALSE;
250 if ((ulkey = reply->userLandNotificationKey) != 0) {
253 reply->userLandNotificationKey = 0;
254 UNDReply_unlock(reply);
263 UNDReply_unlock(reply);
266 UNDReply_deallocate(reply);
349 UNDReplyRef reply = (UNDReplyRef)id;
353 if (reply == UND_REPLY_NULL)
355 UNDReply_lock(reply);
356 if (reply->inprogress == TRUE || reply->userLandNotificationKey != -1) {
357 UNDReply_unlock(reply);
360 reply->inprogress = TRUE;
361 reply->callback = callback;
362 reply_port = ipc_port_make_send(reply->self_port);
363 UNDReply_unlock(reply);
396 UNDReplyRef reply;
403 reply = (UNDReplyRef) port->ip_kobject;
404 assert(reply != UND_REPLY_NULL);
406 return reply;