/* Hash table for fast lookup. Copyright 1999, 2000, 2001 Johan Rydberg, jrydberg@opencores.org. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include "ipc-object.h" #include "ipc-entry.h" /* Initialize the reverse lookup hash table. */ extern void ipc_reverse_init (void); /* Insert ENTRY into the hash table. The object should be locked when this is called. */ extern kern_return_t ipc_reverse_insert (struct ipc_object *object, struct ipc_entry *entry); /* Returns entry structure for . The entry are returned in ENTRYP. The object must be locked. No side effects. */ extern kern_return_t ipc_reverse_lookup (struct ipc_object *object, struct ipc_port *port, struct ipc_entry **entryp); /* Removes ENTRY from the hash table. The object and page must be locked. */ extern void ipc_reverse_remove (struct ipc_entry *entry);