thread_intr.c revision 100b72f4fc209355ff607a0d787aad892d8a44ed
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 2006 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. * This file should not be modified. If you wish to modify it or have it * modified, please contact Sun Microsystems at <LFI149367@-sun-.-com-> * (without anti-spam dashes) #
pragma ident "%Z%%M% %I% %E% SMI" * Create and initialize an interrupt thread. * Set the thread in the TS_FREE state. The state will change * to TS_ONPROC only while the interrupt is active. Think of these * as being on a private free list for the CPU. Being TS_FREE keeps * inactive interrupt threads out of debugger thread lists. * We cannot call thread_create with TS_FREE because of the current * checks there for ONPROC. Fix this when thread_create takes flags. * Nobody should ever reference the credentials of an interrupt * thread so make it NULL to catch any such references. * Don't make a user-requested binding on this thread so that * the processor can be offlined. *(
tp->
t_stk) = 0;
/* terminate intr thread stack */ * Link onto CPU's interrupt pool. * Allocate a given number of interrupt threads for a given CPU. * These threads will get freed by cpu_destroy_bound_threads() * when CPU gets unconfigured.