source: rtems/testsuites/sptests/sp07/tcreate.c @ b1274bd9

4.104.115
Last change on this file since b1274bd9 was b1274bd9, checked in by Ralf Corsepius <ralf.corsepius@…>, on 11/30/09 at 03:33:25

Whitespace removal.

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*  Task_create_extension
2 *
3 *  This routine is the tcreate user extension.
4 *
5 *  Input parameters:
6 *    unused       - pointer to currently running TCB
7 *    created_task - pointer to new TCB being created
8 *
9 *  Output parameters:  NONE
10 *
11 *  COPYRIGHT (c) 1989-1999.
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.com/license/LICENSE.
17 *
18 *  $Id$
19 */
20
21#include "system.h"
22
23bool Task_create_extension(
24  rtems_tcb *unused,
25  rtems_tcb *created_task
26)
27{
28  char line[80];
29  rtems_name name;
30
31  if ( task_number( created_task->Object.id ) > 0 ) {
32    name = Task_name[ task_number( created_task->Object.id ) ];
33/*
34 * FIXME: There should be a public function to
35 * convert numeric rtems_names into char arrays
36 * c.f. rtems_name_to_characters() in rtems/rtems/support.inl
37 * but it's private.
38 */
39    sprintf( line, "TASK_CREATE - %c%c%c%c - created\n",
40      (char)((name >> 24) & 0xff),
41      (char)((name >> 16) & 0xff),
42      (char)((name >> 8) & 0xff),
43      (char)(name & 0xff)
44    );
45    buffered_io_add_string( line );
46  }
47  return TRUE;
48}
Note: See TracBrowser for help on using the repository browser.