Changeset c4645e4d in rtems-libbsd


Ignore:
Timestamp:
Oct 30, 2013, 10:57:31 AM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, c1e05b9ea378b2971e3d7704779112b4bc4296da, freebsd-9.3, 4a77611a223ea883fb548679b516d326a020d447
Children:
42c9944
Parents:
58b493b
git-author:
Sebastian Huber <sebastian.huber@…> (10/30/13 10:57:31)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/31/13 12:18:53)
Message:

PING(8): Use BSD program lock

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freebsd/sbin/ping/ping.c

    r58b493b rc4645e4d  
    4545#define __need_getopt_newlib
    4646#include <getopt.h>
     47#include <machine/rtems-bsd-program.h>
     48#include <machine/rtems-bsd-commands.h>
    4749#endif /* __rtems__ */
    4850#include <sys/cdefs.h>
     
    221223
    222224#ifdef __rtems__
    223 #include <machine/rtems-bsd-program.h>
    224 #include <machine/rtems-bsd-commands.h>
    225 
    226225static int main(int argc, char **argv);
    227226
    228227int rtems_bsd_command_ping(int argc, char *argv[])
    229228{
     229        int exit_code;
     230
     231        rtems_bsd_program_lock();
     232
    230233        BBELL = '\a';
    231234        BSPACE = '\b';
     
    244247        tsumsq = 0.0;
    245248
    246         return rtems_bsd_program_call_main("ping", main, argc, argv);
     249        exit_code = rtems_bsd_program_call_main("ping", main, argc, argv);
     250
     251        rtems_bsd_program_unlock();
     252
     253        return exit_code;
    247254}
    248255#endif /* __rtems__ */
Note: See TracChangeset for help on using the changeset viewer.