Changeset eaa442fc in rtems


Ignore:
Timestamp:
01/19/96 22:20:40 (28 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
29310016
Parents:
05e4e419
Message:

added a task begin extension for unix simulator configurations. This extension
insures that stdout is line buffered (see setvbuf).

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/libcsupport/src/newlibc.c

    r05e4e419 reaa442fc  
    4747#include <sys/reent.h>          /* for extern of _REENT (aka _impure_ptr) */
    4848
     49#ifdef RTEMS_UNIX
     50#include <stdio.h>              /* for setvbuf() */
     51#endif
     52
    4953#include "internal.h"
    5054
     
    110114    MY_task_set_note(starting_task, LIBC_NOTEPAD, (rtems_unsigned32) ptr);
    111115}
     116
     117/*
     118 * Called for all user TASKS (system tasks are SYSI and IDLE)
     119 *
     120 *  NOTE: When using RTEMS fake stat, fstat, and isatty, all output
     121 *        is line buffered so this setvbuf is not necessary.  This
     122 *        setvbuf insures that we can redirect the output of a test
     123 *        on the UNIX simulator and it is in the same order as for a
     124 *        real target.
     125 */
     126 
     127#ifdef RTEMS_UNIX
     128rtems_extension
     129libc_begin_hook(rtems_tcb *current_task)
     130{
     131  setvbuf( stdout, NULL, _IOLBF, BUFSIZ );
     132}
     133#endif
    112134
    113135rtems_extension
     
    245267        libc_extension.thread_create  = libc_create_hook;
    246268        libc_extension.thread_start   = libc_start_hook;
     269#ifdef RTEMS_UNIX
     270        libc_extension.thread_begin   = libc_begin_hook;
     271#endif
    247272        libc_extension.thread_switch  = libc_switch_hook;
    248273        libc_extension.thread_delete  = libc_delete_hook;
  • c/src/lib/libc/newlibc.c

    r05e4e419 reaa442fc  
    4747#include <sys/reent.h>          /* for extern of _REENT (aka _impure_ptr) */
    4848
     49#ifdef RTEMS_UNIX
     50#include <stdio.h>              /* for setvbuf() */
     51#endif
     52
    4953#include "internal.h"
    5054
     
    110114    MY_task_set_note(starting_task, LIBC_NOTEPAD, (rtems_unsigned32) ptr);
    111115}
     116
     117/*
     118 * Called for all user TASKS (system tasks are SYSI and IDLE)
     119 *
     120 *  NOTE: When using RTEMS fake stat, fstat, and isatty, all output
     121 *        is line buffered so this setvbuf is not necessary.  This
     122 *        setvbuf insures that we can redirect the output of a test
     123 *        on the UNIX simulator and it is in the same order as for a
     124 *        real target.
     125 */
     126 
     127#ifdef RTEMS_UNIX
     128rtems_extension
     129libc_begin_hook(rtems_tcb *current_task)
     130{
     131  setvbuf( stdout, NULL, _IOLBF, BUFSIZ );
     132}
     133#endif
    112134
    113135rtems_extension
     
    245267        libc_extension.thread_create  = libc_create_hook;
    246268        libc_extension.thread_start   = libc_start_hook;
     269#ifdef RTEMS_UNIX
     270        libc_extension.thread_begin   = libc_begin_hook;
     271#endif
    247272        libc_extension.thread_switch  = libc_switch_hook;
    248273        libc_extension.thread_delete  = libc_delete_hook;
  • cpukit/libcsupport/src/newlibc.c

    r05e4e419 reaa442fc  
    4747#include <sys/reent.h>          /* for extern of _REENT (aka _impure_ptr) */
    4848
     49#ifdef RTEMS_UNIX
     50#include <stdio.h>              /* for setvbuf() */
     51#endif
     52
    4953#include "internal.h"
    5054
     
    110114    MY_task_set_note(starting_task, LIBC_NOTEPAD, (rtems_unsigned32) ptr);
    111115}
     116
     117/*
     118 * Called for all user TASKS (system tasks are SYSI and IDLE)
     119 *
     120 *  NOTE: When using RTEMS fake stat, fstat, and isatty, all output
     121 *        is line buffered so this setvbuf is not necessary.  This
     122 *        setvbuf insures that we can redirect the output of a test
     123 *        on the UNIX simulator and it is in the same order as for a
     124 *        real target.
     125 */
     126 
     127#ifdef RTEMS_UNIX
     128rtems_extension
     129libc_begin_hook(rtems_tcb *current_task)
     130{
     131  setvbuf( stdout, NULL, _IOLBF, BUFSIZ );
     132}
     133#endif
    112134
    113135rtems_extension
     
    245267        libc_extension.thread_create  = libc_create_hook;
    246268        libc_extension.thread_start   = libc_start_hook;
     269#ifdef RTEMS_UNIX
     270        libc_extension.thread_begin   = libc_begin_hook;
     271#endif
    247272        libc_extension.thread_switch  = libc_switch_hook;
    248273        libc_extension.thread_delete  = libc_delete_hook;
Note: See TracChangeset for help on using the changeset viewer.