• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /xnu-2782.1.97/osfmk/UserNotification/

Lines Matching refs:reply

64 #define UNDReply_lock(reply)		lck_mtx_lock(&reply->lock)
65 #define UNDReply_unlock(reply) lck_mtx_unlock(&reply->lock)
71 UNDReplyRef reply);
76 UNDReplyRef reply)
80 UNDReply_lock(reply);
81 port = reply->self_port;
84 reply->self_port = IP_NULL;
85 UNDReply_unlock(reply);
88 lck_mtx_destroy(&reply->lock, &LockCompatGroup);
89 kfree(reply, sizeof(struct UNDReply));
118 UNDReplyRef reply,
134 if (reply == UND_REPLY_NULL || !reply->inprogress)
153 if (reply->callback) {
154 (reply->callback)((int)(KUNCUserNotificationID)reply, result, dict);
157 UNDReply_lock(reply);
158 reply->inprogress = FALSE;
159 reply->userLandNotificationKey = -1;
160 UNDReply_unlock(reply);
161 UNDReply_deallocate(reply);
175 UNDReplyRef reply,
178 if (reply == UND_REPLY_NULL)
181 UNDReply_lock(reply);
182 if (reply->inprogress || reply->userLandNotificationKey != -1) {
183 UNDReply_unlock(reply);
186 reply->userLandNotificationKey = userLandNotificationKey;
187 UNDReply_unlock(reply);
199 UNDReplyRef reply;
201 reply = (UNDReplyRef) kalloc(sizeof(struct UNDReply));
202 if (reply != UND_REPLY_NULL) {
203 reply->self_port = ipc_port_alloc_kernel();
204 if (reply->self_port == IP_NULL) {
205 kfree(reply, sizeof(struct UNDReply));
206 reply = UND_REPLY_NULL;
208 lck_mtx_init(&reply->lock, &LockCompatGroup, LCK_ATTR_NULL);
209 reply->userLandNotificationKey = -1;
210 reply->inprogress = FALSE;
211 ipc_kobject_set(reply->self_port,
212 (ipc_kobject_t)reply,
216 return (KUNCUserNotificationID) reply;
238 UNDReplyRef reply = (UNDReplyRef)id;
242 if (reply == UND_REPLY_NULL)
245 UNDReply_lock(reply);
246 if (!reply->inprogress) {
247 UNDReply_unlock(reply);
251 reply->inprogress = FALSE;
252 if ((ulkey = reply->userLandNotificationKey) != 0) {
255 reply->userLandNotificationKey = 0;
256 UNDReply_unlock(reply);
265 UNDReply_unlock(reply);
268 UNDReply_deallocate(reply);
351 UNDReplyRef reply = (UNDReplyRef)id;
355 if (reply == UND_REPLY_NULL)
357 UNDReply_lock(reply);
358 if (reply->inprogress == TRUE || reply->userLandNotificationKey != -1) {
359 UNDReply_unlock(reply);
362 reply->inprogress = TRUE;
363 reply->callback = callback;
364 reply_port = ipc_port_make_send(reply->self_port);
365 UNDReply_unlock(reply);
398 UNDReplyRef reply;
405 reply = (UNDReplyRef) port->ip_kobject;
406 assert(reply != UND_REPLY_NULL);
408 return reply;