Changeset 26cdc2a in rtems


Ignore:
Timestamp:
Mar 25, 2003, 7:00:35 PM (17 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
a281b95
Parents:
b7e2596
Message:

2002-03-25 Eric Norum <norume@…>

PR 374/networking

  • Makefile.am, rtems/rtems_bsdnet.h, rtems/rtems_glue.c: The patch sent as part of PR270 got applied to the wrong place. The effect was that (1) startup was no faster than before and (2) malloc starvation messages came way too quickly. The attached patch fixes both these problems and also provides a mechanism for applications to handle malloc starvation conditions as they see fit.
  • rtems/rtems_bsdnet_malloc_starvation.c: New file.
Location:
cpukit/libnetworking
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libnetworking/ChangeLog

    rb7e2596 r26cdc2a  
     12002-03-25      Eric Norum <norume@aps.anl.gov>
     2
     3
     4        PR 374/networking
     5        * Makefile.am, rtems/rtems_bsdnet.h, rtems/rtems_glue.c:
     6        The patch sent as part of PR270 got applied to the wrong place. 
     7        The effect was that (1) startup was no faster than before and
     8        (2) malloc starvation messages came way too quickly.  The attached
     9        patch fixes both these problems and also provides a mechanism for
     10        applications to handle malloc starvation conditions as they see fit.
     11        * rtems/rtems_bsdnet_malloc_starvation.c: New file.
     12
    1132003-03-18      Till Straumann <strauman@slac.stanford.edu>
    214
  • cpukit/libnetworking/Makefile.am

    rb7e2596 r26cdc2a  
    160160    rtems/rtems_bootp.c rtems/rtems_showmbuf.c rtems/rtems_showroute.c rtems/rtems_showifstat.c \
    161161    rtems/rtems_showipstat.c rtems/rtems_showicmpstat.c rtems/rtems_showtcpstat.c \
    162     rtems/rtems_showudpstat.c rtems/rtems_select.c rtems/mkrootfs.c
     162    rtems/rtems_showudpstat.c rtems/rtems_select.c rtems/mkrootfs.c \
     163    rtems/rtems_bsdnet_malloc_starvation.c
    163164OBJS += $(rtems_C_FILES:rtems/%.c=$(ARCH)/%.$(OBJEXT))
    164165
  • cpukit/libnetworking/rtems/rtems_bsdnet.h

    rb7e2596 r26cdc2a  
    183183int rtems_bsdnet_synchronize_ntp (int interval, rtems_task_priority priority);
    184184
     185/*
     186 * Callback to report BSD malloc starvation.
     187 * The default implementation just prints a message but an application
     188 * can provide its own version.
     189 */
     190void rtems_bsdnet_malloc_starvation(void);
     191
    185192#endif /* _RTEMS_BSDNET_ */
  • cpukit/libnetworking/rtems/rtems_glue.c

    rb7e2596 r26cdc2a  
    118118                rtems_bsdnet_semaphore_release ();
    119119                if (++try >= 30) {
    120                         printf ("rtems_bsdnet_malloc still waiting.\n");
     120                        rtems_bsdnet_malloc_starvation();
    121121                        try = 0;
    122122                }
    123                 while (rtems_bsdnet_seconds_since_boot() == 0)
    124                         rtems_task_wake_after(1);
     123        rtems_task_wake_after (rtems_bsdnet_ticks_per_second);
    125124                rtems_bsdnet_semaphore_obtain ();
    126125        }
     
    273272         * Ensure that `seconds' is greater than 0
    274273         */
    275         rtems_task_wake_after (rtems_bsdnet_ticks_per_second);
     274    while (rtems_bsdnet_seconds_since_boot() == 0)
     275        rtems_task_wake_after(1);
    276276
    277277        /*
Note: See TracChangeset for help on using the changeset viewer.