source: rtems/cpukit/rtems/src/taskstart.c @ 6b5f22dc

Last change on this file since 6b5f22dc was 6b5f22dc, checked in by Sebastian Huber <sebastian.huber@…>, on 11/26/20 at 10:45:47

rtems: Canonicalize Doxygen @file comments

Use common phrases for the file brief descriptions.

Update #3706.

  • Property mode set to 100644
File size: 1.3 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup RTEMSImplClassicTask
5 *
6 * @brief This source file contains the implementation of
7 *   rtems_task_start().
8 */
9
10/*
11 *  COPYRIGHT (c) 1989-2014.
12 *  On-Line Applications Research Corporation (OAR).
13 *
14 *  The license and distribution terms for this file may be
15 *  found in the file LICENSE in this distribution or at
16 *  http://www.rtems.org/license/LICENSE.
17 */
18
19#ifdef HAVE_CONFIG_H
20#include "config.h"
21#endif
22
23#include <rtems/rtems/tasks.h>
24#include <rtems/score/threadimpl.h>
25
26rtems_status_code rtems_task_start(
27  rtems_id            id,
28  rtems_task_entry    entry_point,
29  rtems_task_argument argument
30)
31{
32  Thread_Entry_information entry = {
33    .adaptor = _Thread_Entry_adaptor_numeric,
34    .Kinds = {
35      .Numeric = {
36        .entry = entry_point,
37        .argument = argument
38      }
39    }
40  };
41  Thread_Control   *the_thread;
42  ISR_lock_Context  lock_context;
43  bool              ok;
44
45  the_thread = _Thread_Get( id, &lock_context );
46
47  if ( the_thread == NULL ) {
48#if defined(RTEMS_MULTIPROCESSING)
49    if ( _Thread_MP_Is_remote( id ) ) {
50      return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
51    }
52#endif
53
54    return RTEMS_INVALID_ID;
55  }
56
57  ok = _Thread_Start( the_thread, &entry, &lock_context );
58
59  return ok ? RTEMS_SUCCESSFUL : RTEMS_INCORRECT_STATE;
60}
Note: See TracBrowser for help on using the repository browser.