source: rtems/cpukit/libcsupport/include/rtems/libcsupport.h @ 214cbd9

4.104.114.95
Last change on this file since 214cbd9 was c3db01d0, checked in by Joel Sherrill <joel.sherrill@…>, on 05/09/07 at 18:27:26

2007-05-09 Joel Sherrill <joel.sherrill@…>

  • libcsupport/include/rtems/libcsupport.h, libcsupport/src/newlibc.c, sapi/Makefile.am, sapi/include/confdefs.h, sapi/src/exinit.c, score/Makefile.am, score/preinstall.am, score/include/rtems/score/userext.h, score/src/chain.c, score/src/userext.c: Switch to newlib reentrancy extension being installed in the initial set instead of using rtems_extension_create. While implementing this, noticed that user extensions and chain code had multiple functions in a single file which is not desirable in the SuperCore? and API portions of RTEMS, so split these into multiple files with one function per file. Also noticed that some of user extension code was inlined for no particular reason so moved that to C bodies. Split executive shutdown from initialization since not every application shuts down. Moved fini call to executive shutdown to be more symmetrical with where it is called at startup.
  • sapi/src/exshutdown.c, score/src/chainappend.c, score/src/chainextract.c, score/src/chainget.c, score/src/chaininsert.c, score/src/userextaddapiset.c, score/src/userextaddset.c, score/src/userextremoveset.c, score/src/userextthreadbegin.c, score/src/userextthreadcreate.c, score/src/userextthreaddelete.c, score/src/userextthreadrestart.c, score/src/userextthreadstart.c, score/src/userextthreadswitch.c: New files.
  • score/inline/rtems/score/userext.inl: Removed.
  • Property mode set to 100644
File size: 2.0 KB
Line 
1/**
2 * @file rtems/libcsupport.h
3 */
4
5/*  libcsupport.h
6 *
7 *  This include file contains the information regarding the
8 *  RTEMS specific support for the standard C library.
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.com/license/LICENSE.
16 *
17 *  $Id$
18 */
19
20#ifndef _RTEMS_RTEMS_LIBCSUPPORT_H
21#define _RTEMS_RTEMS_LIBCSUPPORT_H
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#include <sys/types.h>
28
29void RTEMS_Malloc_Initialize(
30  void   *start,
31  size_t  length,
32  size_t  sbrk_amount
33);
34
35extern void malloc_dump(void);
36extern void malloc_walk(size_t source, size_t printf_enabled);
37extern void libc_init(int reentrant);
38extern int  host_errno(void);
39extern void fix_syscall_errno(void);
40extern size_t malloc_free_space();
41
42/*
43 *  Prototypes required to install newlib reentrancy user extension
44 */
45rtems_boolean libc_create_hook(
46  rtems_tcb *current_task,
47  rtems_tcb *creating_task
48);
49
50#if defined(RTEMS_UNIX) && !defined(hpux)
51  rtems_extension libc_begin_hook(rtems_tcb *current_task);
52  #define __RTEMS_NEWLIB_BEGIN libc_begin_hook
53#else
54  #define __RTEMS_NEWLIB_BEGIN 0
55#endif
56
57rtems_extension libc_delete_hook(
58  rtems_tcb *current_task,
59  rtems_tcb *deleted_task
60);
61
62#define RTEMS_NEWLIB_EXTENSION \
63{ \
64  libc_create_hook,                            /* rtems_task_create  */ \
65  0,                                           /* rtems_task_start   */ \
66  0,                                           /* rtems_task_restart */ \
67  libc_delete_hook,                            /* rtems_task_delete  */ \
68  0,                                           /* task_switch  */ \
69  __RTEMS_NEWLIB_BEGIN,                        /* task_begin   */ \
70  0,                                           /* task_exitted */ \
71  0                                            /* fatal        */ \
72}
73
74#ifdef __cplusplus
75}
76#endif
77
78#endif
79/* end of include file */
Note: See TracBrowser for help on using the repository browser.