4.1155-freebsd-126-freebsd-12freebsd-9.3
Last change
on this file since 6ad03bf was
6ad03bf,
checked in by Joel Sherrill <joel.sherrill@…>, on 03/08/12 at 16:31:56
|
Remove rtems/ from includes of RTEMS specific files
|
-
Property mode set to
100644
|
File size:
870 bytes
|
Rev | Line | |
---|
[a9153ec] | 1 | /** |
---|
| 2 | * @file |
---|
| 3 | * |
---|
| 4 | * @ingroup rtems_bsd_rtems |
---|
| 5 | * |
---|
| 6 | * @brief TODO. |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | /* |
---|
| 10 | * Copyright (c) 2009, 2010 embedded brains GmbH. All rights reserved. |
---|
| 11 | * |
---|
| 12 | * embedded brains GmbH |
---|
| 13 | * Obere Lagerstr. 30 |
---|
| 14 | * 82178 Puchheim |
---|
| 15 | * Germany |
---|
| 16 | * <rtems@embedded-brains.de> |
---|
| 17 | * |
---|
| 18 | * The license and distribution terms for this file may be |
---|
| 19 | * found in the file LICENSE in this distribution or at |
---|
| 20 | * http://www.rtems.com/license/LICENSE. |
---|
| 21 | */ |
---|
| 22 | |
---|
[6ad03bf] | 23 | #include <freebsd/machine/rtems-bsd-config.h> |
---|
[a9153ec] | 24 | |
---|
[6ad03bf] | 25 | #include <freebsd/sys/param.h> |
---|
| 26 | #include <freebsd/sys/types.h> |
---|
| 27 | #include <freebsd/sys/systm.h> |
---|
| 28 | #include <freebsd/sys/kernel.h> |
---|
[a9153ec] | 29 | |
---|
| 30 | void |
---|
| 31 | DELAY(int usec) |
---|
| 32 | { |
---|
| 33 | rtems_status_code sc = RTEMS_SUCCESSFUL; |
---|
| 34 | |
---|
| 35 | /* FIXME: Integer conversion */ |
---|
| 36 | rtems_interval ticks = |
---|
| 37 | ((rtems_interval) usec * (rtems_interval) hz) / 1000000; |
---|
| 38 | |
---|
| 39 | if (ticks == 0) { |
---|
| 40 | ticks = 1; |
---|
| 41 | } |
---|
| 42 | |
---|
| 43 | sc = rtems_task_wake_after(ticks); |
---|
| 44 | BSD_ASSERT_SC(sc); |
---|
| 45 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.