subr_hal.c (189004) | subr_hal.c (189488) |
---|---|
1/*- 2 * Copyright (c) 2003 3 * Bill Paul <wpaul@windriver.com>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2003 3 * Bill Paul <wpaul@windriver.com>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/sys/compat/ndis/subr_hal.c 189004 2009-02-24 18:09:31Z rdivacky $"); | 34__FBSDID("$FreeBSD: head/sys/compat/ndis/subr_hal.c 189488 2009-03-07 07:26:22Z weongyo $"); |
35 36#include <sys/param.h> 37#include <sys/types.h> 38#include <sys/errno.h> 39 40#include <sys/callout.h> 41#include <sys/kernel.h> 42#include <sys/lock.h> --- 54 unchanged lines hidden (view full) --- 97 patch = hal_functbl; 98 while (patch->ipt_func != NULL) { 99 windrv_wrap((funcptr)patch->ipt_func, 100 (funcptr *)&patch->ipt_wrap, 101 patch->ipt_argcnt, patch->ipt_ftype); 102 patch++; 103 } 104 | 35 36#include <sys/param.h> 37#include <sys/types.h> 38#include <sys/errno.h> 39 40#include <sys/callout.h> 41#include <sys/kernel.h> 42#include <sys/lock.h> --- 54 unchanged lines hidden (view full) --- 97 patch = hal_functbl; 98 while (patch->ipt_func != NULL) { 99 windrv_wrap((funcptr)patch->ipt_func, 100 (funcptr *)&patch->ipt_wrap, 101 patch->ipt_argcnt, patch->ipt_ftype); 102 patch++; 103 } 104 |
105 | 105 |
106 return(0); 107} 108 109int 110hal_libfini() 111{ 112 image_patch_table *patch; 113 int i; --- 5 unchanged lines hidden (view full) --- 119 while (patch->ipt_func != NULL) { 120 windrv_unwrap(patch->ipt_wrap); 121 patch++; 122 } 123 124 return(0); 125} 126 | 106 return(0); 107} 108 109int 110hal_libfini() 111{ 112 image_patch_table *patch; 113 int i; --- 5 unchanged lines hidden (view full) --- 119 while (patch->ipt_func != NULL) { 120 windrv_unwrap(patch->ipt_wrap); 121 patch++; 122 } 123 124 return(0); 125} 126 |
127struct mtx * 128hal_getdisplock() 129{ 130 131 return &disp_lock[curthread->td_oncpu]; 132} 133 |
|
127static void 128KeStallExecutionProcessor(usecs) 129 uint32_t usecs; 130{ 131 DELAY(usecs); 132 return; 133} 134 --- 280 unchanged lines hidden (view full) --- 415 sched_pin(); 416 mtx_lock(&disp_lock[curthread->td_oncpu]); 417 } 418/*printf("RAISE IRQL: %d %d\n", irql, oldirql);*/ 419 420 return(oldirql); 421} 422 | 134static void 135KeStallExecutionProcessor(usecs) 136 uint32_t usecs; 137{ 138 DELAY(usecs); 139 return; 140} 141 --- 280 unchanged lines hidden (view full) --- 422 sched_pin(); 423 mtx_lock(&disp_lock[curthread->td_oncpu]); 424 } 425/*printf("RAISE IRQL: %d %d\n", irql, oldirql);*/ 426 427 return(oldirql); 428} 429 |
423void | 430void |
424KfLowerIrql(uint8_t oldirql) 425{ 426 if (oldirql == DISPATCH_LEVEL) 427 return; 428 429 if (KeGetCurrentIrql() != DISPATCH_LEVEL) 430 panic("IRQL_NOT_GREATER_THAN"); 431 --- 65 unchanged lines hidden --- | 431KfLowerIrql(uint8_t oldirql) 432{ 433 if (oldirql == DISPATCH_LEVEL) 434 return; 435 436 if (KeGetCurrentIrql() != DISPATCH_LEVEL) 437 panic("IRQL_NOT_GREATER_THAN"); 438 --- 65 unchanged lines hidden --- |