X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/e5568f75972dfc723778653c11cb6b4dc825716a..5d5c5d0d5b79ade9a973d55186ffda2638ba2b6e:/osfmk/ipc/ipc_mqueue.h diff --git a/osfmk/ipc/ipc_mqueue.h b/osfmk/ipc/ipc_mqueue.h index 209414666..449db8321 100644 --- a/osfmk/ipc/ipc_mqueue.h +++ b/osfmk/ipc/ipc_mqueue.h @@ -1,23 +1,31 @@ /* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. * - * @APPLE_LICENSE_HEADER_START@ + * @APPLE_LICENSE_OSREFERENCE_HEADER_START@ * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. - * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. - * - * @APPLE_LICENSE_HEADER_END@ + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the + * License may not be used to create, or enable the creation or + * redistribution of, unlawful or unlicensed copies of an Apple operating + * system, or to circumvent, violate, or enable the circumvention or + * violation of, any terms of an Apple operating system software license + * agreement. + * + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_OSREFERENCE_HEADER_END@ */ /* * @OSF_COPYRIGHT@ @@ -66,6 +74,7 @@ #include #include +#include #include #include @@ -118,19 +127,46 @@ extern int ipc_mqueue_rcv; /* Initialize a newly-allocated message queue */ extern void ipc_mqueue_init( - ipc_mqueue_t mqueue, - boolean_t is_set); + ipc_mqueue_t mqueue, + boolean_t is_set); + +/* destroy an mqueue */ +extern void ipc_mqueue_destroy( + ipc_mqueue_t mqueue); /* Wake up receivers waiting in a message queue */ extern void ipc_mqueue_changed( ipc_mqueue_t mqueue); +/* Add the specific mqueue as a member of the set */ +extern kern_return_t ipc_mqueue_add( + ipc_mqueue_t mqueue, + ipc_mqueue_t set_mqueue); + +/* Check to see if mqueue is member of set_mqueue */ +extern boolean_t ipc_mqueue_member( + ipc_mqueue_t mqueue, + ipc_mqueue_t set_mqueue); + +/* Remove an mqueue from a specific set */ +extern kern_return_t ipc_mqueue_remove( + ipc_mqueue_t mqueue, + ipc_mqueue_t set_mqueue); + +/* Remove an mqueue from all sets */ +extern void ipc_mqueue_remove_from_all( + ipc_mqueue_t mqueue); + +/* Remove all the members of the specifiied set */ +extern void ipc_mqueue_remove_all( + ipc_mqueue_t mqueue); + /* Send a message to a port */ extern mach_msg_return_t ipc_mqueue_send( ipc_mqueue_t mqueue, ipc_kmsg_t kmsg, mach_msg_option_t option, - mach_msg_timeout_t timeout); + mach_msg_timeout_t timeout_val); /* Deliver message to message queue or waiting receiver */ extern void ipc_mqueue_post( @@ -142,11 +178,13 @@ extern void ipc_mqueue_receive( ipc_mqueue_t mqueue, mach_msg_option_t option, mach_msg_size_t max_size, - mach_msg_timeout_t timeout, + mach_msg_timeout_t timeout_val, int interruptible); /* Continuation routine for message receive */ -extern void ipc_mqueue_receive_continue(void); +extern void ipc_mqueue_receive_continue( + void *param, + wait_result_t wresult); /* Select a message from a queue and try to post it to ourself */ extern void ipc_mqueue_select(