Changeset 1f94ed6b in rtems for c/src/lib


Ignore:
Timestamp:
04/22/96 16:50:17 (28 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
5a36154a
Parents:
34f3d17
Message:

Updates from Tony Bennett.

Location:
c/src/lib
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/include/rtems/libio.h

    r34f3d17 r1f94ed6b  
    11/*
    2  *      @(#)libio.h     1.1 - 95/06/02
    3  *     
    4  *
    52 * General purpose communication channel for RTEMS to allow UNIX/POSIX
    63 *    system call behavior on top of RTEMS IO devices.
  • c/src/lib/libbsp/unix/posix/startup/bspstart.c

    r34f3d17 r1f94ed6b  
    1 /*
    2  *      @(#)bspstart.c  1.7 - 95/04/07
    3  *
    4  */
    5 
    61/*  bsp_start()
    72 *
     
    5651int                          rtems_argc;
    5752char                       **rtems_argv;
    58 char                       **rtems_envp;
    5953
    6054/*
     
    167161#ifdef RTEMS_DEBUG
    168162    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
     163#endif
     164
     165    /*
     166     * Dump malloc stats on exit...
     167     */
     168#if defined(RTEMS_DEBUG)
     169  atexit(malloc_dump);
    169170#endif
    170171}
     
    199200    rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
    200201#endif
    201 
    202 #if defined(MALLOC_STATS)
    203   atexit(malloc_dump);
    204 #endif
    205 
    206202}
    207203
  • c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc

    r34f3d17 r1f94ed6b  
    1 //
    2 //      @(#)rtems-ctor.cc       1.6 - 95/04/25
    3 //
    4 
    51/*
    62 *  rtems-ctor.cc
     
    9187        rtems_argc = argc;
    9288        rtems_argv = argv;
    93         rtems_envp = environp;
    9489
    9590        if ((argc > 0) && argv && argv[0])
  • c/src/lib/libbsp/unix/posix/startup/setvec.c

    r34f3d17 r1f94ed6b  
    3232)
    3333{
    34     rtems_isr_entry  rtems_isr_ptr;
     34    rtems_isr_entry  rtems_isr_ptr = 0;
    3535    proc_ptr         raw_isr_ptr;
    3636
  • c/src/lib/libc/libio.c

    r34f3d17 r1f94ed6b  
    11/*
    2  *      @(#)libio.c     1.1 - 95/06/02
    3  *     
    4  *
    52 * Provide UNIX/POSIX-like io system calls for RTEMS using the
    63 *  RTEMS IO manager
  • c/src/lib/libc/libio.h

    r34f3d17 r1f94ed6b  
    11/*
    2  *      @(#)libio.h     1.1 - 95/06/02
    3  *     
    4  *
    52 * General purpose communication channel for RTEMS to allow UNIX/POSIX
    63 *    system call behavior on top of RTEMS IO devices.
  • c/src/lib/libc/malloc.c

    r34f3d17 r1f94ed6b  
    2626#include <errno.h>
    2727#include <string.h>
     28#include <unistd.h>    /* sbrk(2) */
    2829
    2930rtems_id RTEMS_Malloc_Heap;
     
    3233#ifdef RTEMS_DEBUG
    3334#define MALLOC_STATS
     35#define MALLOC_DIRTY
    3436#endif
    3537
     
    203205  }
    204206#endif
    205  
     207
     208#ifdef MALLOC_DIRTY
     209  (void) memset(return_this, 0xCF, size);
     210#endif
     211
    206212  return return_this;
    207213}
     
    221227  if ( cptr )
    222228    memset( cptr, '\0', length );
     229
     230  MSBUMP(malloc_calls, -1);   /* subtract off the malloc */
    223231
    224232  return cptr;
  • c/src/lib/libc/newlibc.c

    r34f3d17 r1f94ed6b  
    1 /*
    2  *      @(#)newlibc.c   1.9 - 95/05/16
    3  *     
    4  */
    5 
    61#if defined(RTEMS_NEWLIB)
    72
    83/*
    9  *  File:       newlibc.c,v
    10  *  Project:    PixelFlow
    11  *  Created:    94/12/7
    12  *  Revision:   1.2
    13  *  Last Mod:   1995/05/09 20:24:37
    14  *
    154 *  COPYRIGHT (c) 1994 by Division Incorporated
    165 *
     
    4837#include <sys/reent.h>          /* for extern of _REENT (aka _impure_ptr) */
    4938
    50 #ifdef RTEMS_UNIX
    51 #include <stdio.h>              /* for setvbuf() */
     39/*
     40 *  NOTE: When using RTEMS fake stat, fstat, and isatty, all output
     41 *        is line buffered so this setvbuf is not necessary.  This
     42 *        setvbuf insures that we can redirect the output of a test
     43 *        on the UNIX simulator and it is in the same order as for a
     44 *        real target.
     45 *  NOTE:
     46 *        There is some problem with doing this on the hpux version
     47 *        of the UNIX simulator (symptom is printf core dumps), so
     48 *        we just don't for now.
     49 *        Not sure if this is a problem with hpux, newlib, or something else.
     50 */
     51 
     52#if defined(RTEMS_UNIX) && !defined(hpux)
     53#define NEED_SETVBUF
     54#endif
     55 
     56#ifdef NEED_SETVBUF
     57#include <stdio.h>
    5258#endif
    5359
     
    197203    if (current_task == deleted_task)
    198204    {
    199         ptr = _REENT;
     205      ptr = _REENT;
    200206    }
    201207    else
    202208    {
    203         ptr = (struct _reent *) MY_task_get_note(deleted_task, LIBC_NOTEPAD);
     209      ptr = (struct _reent *) MY_task_get_note(deleted_task, LIBC_NOTEPAD);
    204210    }
    205211
     
    207213    if (ptr && ptr != &libc_global_reent)
    208214    {
    209         _wrapup_reent(ptr);
    210         _reclaim_reent(ptr);
     215      _wrapup_reent(ptr);
     216      _reclaim_reent(ptr);
     217      free(ptr);
    211218    }
    212219
     
    219226    if (current_task == deleted_task)
    220227    {
    221         _REENT = 0;
     228      _REENT = 0;
    222229    }
    223230}
Note: See TracChangeset for help on using the changeset viewer.