source: rtems/cpukit/itron/src/itroninittasks.c @ ba3e987e

4.104.115
Last change on this file since ba3e987e was 9d2df2b3, checked in by Ralf Corsepius <ralf.corsepius@…>, on 11/03/09 at 05:23:05

Eliminate TRUE/FALSE in favor of true/false.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2008.
3 *  On-Line Applications Research Corporation (OAR).
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *  http://www.rtems.com/license/LICENSE.
8 *
9 *  $Id$
10 */
11
12#if HAVE_CONFIG_H
13#include "config.h"
14#endif
15
16#include <rtems/itron.h>
17
18#include <rtems/score/thread.h>
19#include <rtems/score/userext.h>
20#include <rtems/score/wkspace.h>
21#include <rtems/score/apiext.h>
22#include <rtems/score/sysstate.h>
23
24#include <rtems/itron/task.h>
25
26/*
27 *  _ITRON_Task_Initialize_user_tasks
28 *
29 *  This routine creates and starts all configured user
30 *  initialzation threads.
31 */
32
33void _ITRON_Task_Initialize_user_tasks_body( void )
34{
35  uint32_t                          index;
36  uint32_t                          maximum;
37  ER                                return_value;
38  itron_initialization_tasks_table *user_tasks;
39
40  user_tasks = Configuration_ITRON_API.User_initialization_tasks_table;
41  maximum    = Configuration_ITRON_API.number_of_initialization_tasks;
42
43  if ( !user_tasks || maximum == 0 )
44    return;
45
46  for ( index=0 ; index < maximum ; index++ ) {
47
48    return_value = cre_tsk(
49       user_tasks[ index ].id,
50       &user_tasks[ index ].attributes
51    );
52
53    if ( return_value != E_OK )
54      _Internal_error_Occurred( INTERNAL_ERROR_ITRON_API, true, return_value );
55
56    return_value = sta_tsk( user_tasks[ index ].id, 0 );
57
58    if ( return_value != E_OK )
59      _Internal_error_Occurred( INTERNAL_ERROR_ITRON_API, true, return_value );
60
61  }
62}
Note: See TracBrowser for help on using the repository browser.