source: rtems/cpukit/score/src/threadstart.c @ 0a97ba5b

5
Last change on this file since 0a97ba5b was 1506658c, checked in by Sebastian Huber <sebastian.huber@…>, on 01/08/16 at 11:11:03

score: Simplify _Thread_Start()

  • Property mode set to 100644
File size: 873 bytes
Line 
1/**
2 * @file
3 *
4 * @brief Initializes Thread and Executes it
5 *
6 * @ingroup ScoreThread
7 */
8
9/*
10 *  COPYRIGHT (c) 1989-1999.
11 *  On-Line Applications Research Corporation (OAR).
12 *
13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
15 *  http://www.rtems.org/license/LICENSE.
16 */
17
18#if HAVE_CONFIG_H
19#include "config.h"
20#endif
21
22#include <rtems/score/threadimpl.h>
23#include <rtems/score/isrlevel.h>
24#include <rtems/score/userextimpl.h>
25
26bool _Thread_Start(
27  Thread_Control                 *the_thread,
28  const Thread_Entry_information *entry
29)
30{
31  if ( _States_Is_dormant( the_thread->current_state ) ) {
32    the_thread->Start.Entry = *entry;
33    _Thread_Load_environment( the_thread );
34    _Thread_Ready( the_thread );
35    _User_extensions_Thread_start( the_thread );
36
37    return true;
38  }
39
40  return false;
41}
Note: See TracBrowser for help on using the repository browser.