source: rtems-libbsd/rtemsbsd/src/rtems-bsd-init.c @ 3616a06

4.1155-freebsd-126-freebsd-12freebsd-9.3
Last change on this file since 3616a06 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: 1.2 KB
Line 
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
23#include <freebsd/machine/rtems-bsd-config.h>
24
25#include <freebsd/sys/param.h>
26#include <freebsd/sys/types.h>
27#include <freebsd/sys/systm.h>
28#include <freebsd/sys/kernel.h>
29#include <freebsd/sys/lock.h>
30#include <freebsd/sys/mutex.h>
31#include <freebsd/sys/proc.h>
32
33#include <freebsd/bsd.h>
34
35/* In FreeBSD this is a local function */
36void mi_startup(void);
37
38int hz;
39int tick;
40int maxusers;     /* base tunable */
41
42rtems_status_code
43rtems_bsd_initialize(void)
44{
45        rtems_status_code sc = RTEMS_SUCCESSFUL;
46
47  hz = (int) rtems_clock_get_ticks_per_second();
48  tick = 1000000 / hz;
49  maxusers = 1;
50
51        sc =  rtems_timer_initiate_server(
52                BSD_TASK_PRIORITY_TIMER,
53                BSD_MINIMUM_TASK_STACK_SIZE,
54                RTEMS_DEFAULT_ATTRIBUTES
55        );
56        if (sc != RTEMS_SUCCESSFUL) {
57                return RTEMS_UNSATISFIED;
58        }
59
60        mutex_init();
61
62        mi_startup();
63
64        return RTEMS_SUCCESSFUL;
65}
Note: See TracBrowser for help on using the repository browser.