door.s revision 2
2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A * weak aliases for public interfaces 2N/A * Offsets within struct door_results 2N/A * All of the syscalls except door_return() follow the same pattern. The 2N/A * subcode goes in %r9, after all of the other arguments. 2N/A * size_t data_size, (in bytes) 2N/A * door_return_desc_t *door_ptr, (holds returned desc info) 2N/A * caddr_t stack_base, 2N/A * size_t stack_size) 2N/A * Save stack_base (arg4), since %rcx will be trashed if the syscall 2N/A * returns via sysret 2N/A * On return, we're serving a door_call. Our stack looks like this: 2N/A * descriptors (if any) 2N/A * sp-> struct door_results 2N/A * this is the last server thread - call creation func for more 2N/A /* Call the door server function now */ 2N/A /* Exit the thread if we return here */ 2N/A * Error during door_return call. Repark the thread in the kernel if 2N/A * the error code is EINTR (or ERESTART) and this lwp is still part 2N/A * of the same process. 2N/A jne 4f /* if not, return the error */