OsdSchedule.c (158651) | OsdSchedule.c (166909) |
---|---|
1/*- 2 * Copyright (c) 2000 Michael Smith 3 * Copyright (c) 2000 BSDi 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 16 unchanged lines hidden (view full) --- 25 * SUCH DAMAGE. 26 */ 27 28/* 29 * 6.3 : Scheduling services 30 */ 31 32#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2000 Michael Smith 3 * Copyright (c) 2000 BSDi 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 16 unchanged lines hidden (view full) --- 25 * SUCH DAMAGE. 26 */ 27 28/* 29 * 6.3 : Scheduling services 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/dev/acpica/Osd/OsdSchedule.c 158651 2006-05-16 14:37:58Z phk $"); | 33__FBSDID("$FreeBSD: head/sys/dev/acpica/Osd/OsdSchedule.c 166909 2007-02-23 16:25:08Z jhb $"); |
34 35#include "opt_acpi.h" 36#include <sys/param.h> 37#include <sys/systm.h> 38#include <sys/bus.h> 39#include <sys/interrupt.h> 40#include <sys/kernel.h> 41#include <sys/kthread.h> --- 85 unchanged lines hidden (view full) --- 127 128 return_ACPI_STATUS (AE_OK); 129} 130 131void 132AcpiOsSleep(ACPI_INTEGER Milliseconds) 133{ 134 int timo; | 34 35#include "opt_acpi.h" 36#include <sys/param.h> 37#include <sys/systm.h> 38#include <sys/bus.h> 39#include <sys/interrupt.h> 40#include <sys/kernel.h> 41#include <sys/kthread.h> --- 85 unchanged lines hidden (view full) --- 127 128 return_ACPI_STATUS (AE_OK); 129} 130 131void 132AcpiOsSleep(ACPI_INTEGER Milliseconds) 133{ 134 int timo; |
135 static int dummy; | |
136 137 ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); 138 139 timo = Milliseconds * hz / 1000; 140 141 /* 142 * If requested sleep time is less than our hz resolution, use 143 * DELAY instead for better granularity. 144 */ 145 if (timo > 0) | 135 136 ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); 137 138 timo = Milliseconds * hz / 1000; 139 140 /* 141 * If requested sleep time is less than our hz resolution, use 142 * DELAY instead for better granularity. 143 */ 144 if (timo > 0) |
146 tsleep(&dummy, 0, "acpislp", timo); | 145 pause("acpislp", timo); |
147 else 148 DELAY(Milliseconds * 1000); 149 150 return_VOID; 151} 152 153/* 154 * Return the current time in 100 nanosecond units --- 40 unchanged lines hidden --- | 146 else 147 DELAY(Milliseconds * 1000); 148 149 return_VOID; 150} 151 152/* 153 * Return the current time in 100 nanosecond units --- 40 unchanged lines hidden --- |