OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [itron/] [src/] [sta_tsk.c] - Blame information for rev 30

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
2
 *  COPYRIGHT (c) 1989-1999.
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.OARcorp.com/rtems/license.html.
8
 *
9
 *  $Id: sta_tsk.c,v 1.2 2001-09-27 11:59:13 chris Exp $
10
 */
11
 
12
#include <itron.h>
13
 
14
#include <rtems/score/thread.h>
15
#include <rtems/score/userext.h>
16
#include <rtems/score/wkspace.h>
17
#include <rtems/score/apiext.h>
18
#include <rtems/score/sysstate.h>
19
 
20
#include <rtems/itron/task.h>
21
 
22
 
23
/*
24
 *  sta_tsk - Start Task
25
 */
26
 
27
ER sta_tsk(
28
  ID   tskid,
29
  INT  stacd
30
)
31
{
32
  register Thread_Control *the_thread;
33
  Objects_Locations        location;
34
  boolean                  status;
35
 
36
  the_thread = _ITRON_Task_Get( tskid, &location );
37
  switch ( location ) {
38
    case OBJECTS_REMOTE:
39
    case OBJECTS_ERROR:
40
      return _ITRON_Task_Clarify_get_id_error( tskid );
41
 
42
    case OBJECTS_LOCAL:
43
 
44
      if ( !_States_Is_dormant( the_thread->current_state ) )
45
        _ITRON_return_errorno( E_OBJ );
46
 
47
      status = _Thread_Start(
48
        the_thread,
49
        THREAD_START_NUMERIC, /* XXX should be able to say we have no arg */
50
        the_thread->Start.entry_point,
51
        0,                    /* XXX supercore forces us to have an arg */
52
 
53
      );
54
 
55
      /*
56
       * This error can not happen entry_point is checked in create.
57
         if ( !status )
58
           _ITRON_return_errorno(  E_OBJ );
59
       */
60
 
61
      break;
62
  }
63
 
64
  _ITRON_return_errorno( E_OK );
65
}
66
 
67
 
68
 
69
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.