Changeset 314d327 in rtems


Ignore:
Timestamp:
Mar 6, 2012, 2:36:49 PM (7 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
3bd4656
Parents:
47a45e5c (diff), 41d33b9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of ssh://git.rtems.org/data/git/rtems

Files:
1 deleted
17 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/lm32/shared/milkymist_framebuffer/framebuffer.c

    r47a45e5c r314d327  
    9999      MM_WRITE(MM_VGA_HSYNC_END, 752);
    100100      MM_WRITE(MM_VGA_HSCAN, 799);
    101       MM_WRITE(MM_VGA_VSYNC_START, 491);
    102       MM_WRITE(MM_VGA_VSYNC_END, 493);
    103       MM_WRITE(MM_VGA_VSCAN, 523);
     101      MM_WRITE(MM_VGA_VSYNC_START, 492);
     102      MM_WRITE(MM_VGA_VSYNC_END, 494);
     103      MM_WRITE(MM_VGA_VSCAN, 524);
    104104      MM_WRITE(MM_VGA_CLKSEL, 0);
    105105      break;
     
    110110      MM_WRITE(MM_VGA_HSYNC_END, 976);
    111111      MM_WRITE(MM_VGA_HSCAN, 1040);
    112       MM_WRITE(MM_VGA_VSYNC_START, 637);
    113       MM_WRITE(MM_VGA_VSYNC_END, 643);
    114       MM_WRITE(MM_VGA_VSCAN, 666);
     112      MM_WRITE(MM_VGA_VSYNC_START, 636);
     113      MM_WRITE(MM_VGA_VSYNC_END, 642);
     114      MM_WRITE(MM_VGA_VSCAN, 665);
    115115      MM_WRITE(MM_VGA_CLKSEL, 1);
    116116      break;
     
    121121      MM_WRITE(MM_VGA_HSYNC_END, 1184);
    122122      MM_WRITE(MM_VGA_HSCAN, 1344);
    123       MM_WRITE(MM_VGA_VSYNC_START, 771);
    124       MM_WRITE(MM_VGA_VSYNC_END, 777);
    125       MM_WRITE(MM_VGA_VSCAN, 806);
     123      MM_WRITE(MM_VGA_VSYNC_START, 772);
     124      MM_WRITE(MM_VGA_VSYNC_END, 778);
     125      MM_WRITE(MM_VGA_VSCAN, 807);
    126126      MM_WRITE(MM_VGA_CLKSEL, 2);
    127127      break;
  • c/src/lib/libbsp/lm32/shared/milkymist_usbinput/comloc.h

    r47a45e5c r314d327  
    2323#define COMLOC_KEVT_PRODUCE     COMLOCV(MM_SOFTUSB_DMEM_BASE+0x1142)
    2424#define COMLOC_KEVT(offset)     COMLOCV(MM_SOFTUSB_DMEM_BASE+0x1143+offset)
     25#define COMLOC_MIDI_PRODUCE     COMLOCV(MM_SOFTUSB_DMEM_BASE+0x1183)
     26#define COMLOC_MIDI(offset)     COMLOCV(MM_SOFTUSB_DMEM_BASE+0x1184+offset)
    2527
    2628#endif /* __COMLOC_H_ */
  • c/src/lib/libbsp/lm32/shared/milkymist_usbinput/milkymist_usbinput.h

    r47a45e5c r314d327  
    99 *  $Id$
    1010 *
    11  *  COPYRIGHT (c) 2010 Sebastien Bourdeauducq
     11 *  COPYRIGHT (c) 2010, 2012 Sebastien Bourdeauducq
    1212 */
    1313
     
    1818extern "C" {
    1919#endif
     20
     21/* Ioctls */
     22#define USBINPUT_LOAD_FIRMWARE          0x5500
     23
     24struct usbinput_firmware_description {
     25  const unsigned char *data;
     26  int length;
     27};
    2028
    2129rtems_device_driver usbinput_initialize(
     
    3745);
    3846
     47rtems_device_driver usbinput_control(
     48  rtems_device_major_number major,
     49  rtems_device_minor_number minor,
     50  void *arg
     51);
     52
    3953#define USBINPUT_DRIVER_TABLE_ENTRY {usbinput_initialize, \
    40 usbinput_open, NULL, usbinput_read, NULL, NULL}
     54usbinput_open, NULL, usbinput_read, NULL, usbinput_control}
    4155
    4256#ifdef __cplusplus
  • c/src/lib/libbsp/lm32/shared/milkymist_usbinput/usbinput.c

    r47a45e5c r314d327  
    99 *  $Id$
    1010 *
    11  *  COPYRIGHT (c) 2010, 2011 Sebastien Bourdeauducq
     11 *  COPYRIGHT (c) 2010, 2011, 2012 Sebastien Bourdeauducq
    1212 */
    1313
     
    2626#include "milkymist_usbinput.h"
    2727
    28 static const unsigned char input_firmware[] = {
    29 #include "softusb-input.h"
    30 };
    31 
    3228#include "comloc.h"
    3329
     
    3632static int mouse_consume;
    3733static int keyboard_consume;
     34static int midi_consume;
    3835
    3936static rtems_id event_q;
     
    5956    keyboard_consume = (keyboard_consume + 1) & 0x07;
    6057  }
     58
     59  while(midi_consume != COMLOC_MIDI_PRODUCE) {
     60    for(i=0;i<3;i++)
     61      msg[i] = COMLOC_MIDI(4*midi_consume+i+1);
     62    rtems_message_queue_send(event_q, msg, 3);
     63    midi_consume = (midi_consume + 1) & 0x0f;
     64  }
     65
    6166}
    6267
     
    6873{
    6974  rtems_status_code sc;
    70   volatile unsigned int *usb_dmem
    71     = (volatile unsigned int *)MM_SOFTUSB_DMEM_BASE;
    72   volatile unsigned int *usb_pmem
    73     = (volatile unsigned int *)MM_SOFTUSB_PMEM_BASE;
    74   int i, nwords;
    7575  rtems_isr_entry dummy;
    7676
    7777  MM_WRITE(MM_SOFTUSB_CONTROL, SOFTUSB_CONTROL_RESET);
    78   for(i=0;i<SOFTUSB_DMEM_SIZE/4;i++)
    79     usb_dmem[i] = 0;
    80   for(i=0;i<SOFTUSB_PMEM_SIZE/2;i++)
    81     usb_pmem[i] = 0;
    82   nwords = (sizeof(input_firmware)+1)/2;
    83   for(i=0;i<nwords;i++)
    84     usb_pmem[i] = ((unsigned int)(input_firmware[2*i]))
    85       |((unsigned int)(input_firmware[2*i+1]) << 8);
    86   MM_WRITE(MM_SOFTUSB_CONTROL, 0);
    8778
    8879  mouse_consume = 0;
    8980  keyboard_consume = 0;
     81  midi_consume = 0;
    9082
    9183  sc = rtems_io_register_name(DEVICE_NAME, major, 0);
     
    148140  }
    149141}
     142
     143static void load_firmware(const unsigned char *firmware, int length)
     144{
     145  int i, nwords;
     146  volatile unsigned int *usb_dmem
     147    = (volatile unsigned int *)MM_SOFTUSB_DMEM_BASE;
     148  volatile unsigned int *usb_pmem
     149    = (volatile unsigned int *)MM_SOFTUSB_PMEM_BASE;
     150
     151  MM_WRITE(MM_SOFTUSB_CONTROL, SOFTUSB_CONTROL_RESET);
     152  for(i=0;i<SOFTUSB_DMEM_SIZE/4;i++)
     153    usb_dmem[i] = 0;
     154  for(i=0;i<SOFTUSB_PMEM_SIZE/2;i++)
     155    usb_pmem[i] = 0;
     156  nwords = (length+1)/2;
     157  for(i=0;i<nwords;i++)
     158    usb_pmem[i] = ((unsigned int)(firmware[2*i]))
     159      |((unsigned int)(firmware[2*i+1]) << 8);
     160  MM_WRITE(MM_SOFTUSB_CONTROL, 0);
     161}
     162
     163rtems_device_driver usbinput_control(
     164  rtems_device_major_number major,
     165  rtems_device_minor_number minor,
     166  void *arg
     167)
     168{
     169  rtems_libio_ioctl_args_t *args = arg;
     170  struct usbinput_firmware_description *fd
     171    = (struct usbinput_firmware_description *)args->buffer;
     172
     173  if(args->command == USBINPUT_LOAD_FIRMWARE) {
     174    load_firmware(fd->data, fd->length);
     175    args->ioctl_return = 0;
     176    return RTEMS_SUCCESSFUL;
     177  } else {
     178    args->ioctl_return = -1;
     179    return RTEMS_UNSATISFIED;
     180  }
     181}
  • cpukit/ChangeLog

    r47a45e5c r314d327  
     12012-03-02      Ralf Corsépius <ralf.corsepius@rtems.org>
     2
     3        * libnetworking/resolv.h: Partial sync with FreeBSD.
     4        Add decls for res_send_setqhook, res_send_setrhook.
     5
     62012-03-02      Ralf Corsépius <ralf.corsepius@rtems.org>
     7
     8        * configure.ac: Check for rcmd in unistd.h.
     9        * libnetworking/libc/rcmd.c: Build iff rcmd is declared in unistd.h.
     10        Change rcmd's decl to match with Linux/FreeBSD's decl.
     11
    1122011-12-14      Sebastian Huber <sebastian.huber@embedded-brains.de>
    213
  • cpukit/configure.ac

    r47a45e5c r314d327  
    303303## BSD-ism, excluded from POSIX, but available on most platforms
    304304AC_CHECK_DECLS([sbrk],,,[#include <unistd.h>])
     305AC_CHECK_DECLS([rcmd],,,[#include <unistd.h>])
    305306
    306307## Check if libc provides BSD's strlcpy/strlcat
  • cpukit/libnetworking/libc/rcmd.c

    r47a45e5c r314d327  
    3838#endif
    3939
     40#if HAVE_DECL_RCMD
     41
    4042#include <sys/param.h>
    4143#include <sys/socket.h>
     
    8284rcmd(
    8385        char **ahost,
    84         u_short rport,
     86        int rport,
    8587        const char *locuser,
    8688        const char *remuser,
     
    546548}
    547549#endif
     550#endif
  • cpukit/libnetworking/resolv.h

    r47a45e5c r314d327  
    1 /*-
    2  * Copyright (c) 1983, 1987, 1989, 1993
    3  *      The Regents of the University of California.  All rights reserved.
    4  *
     1/*
     2 * Copyright (c) 1983, 1987, 1989
     3 *    The Regents of the University of California.  All rights reserved.
     4 * 
    55 * Redistribution and use in source and binary forms, with or without
    66 * modification, are permitted provided that the following conditions
     
    1111 *    notice, this list of conditions and the following disclaimer in the
    1212 *    documentation and/or other materials provided with the distribution.
    13  * 3. All advertising materials mentioning features or use of this software
    14  *    must display the following acknowledgement:
    15  *      This product includes software developed by the University of
    16  *      California, Berkeley and its contributors.
    17  * 4. Neither the name of the University nor the names of its contributors
     13 * 3. Neither the name of the University nor the names of its contributors
    1814 *    may be used to endorse or promote products derived from this software
    1915 *    without specific prior written permission.
     
    3329
    3430/*
    35  * Portions Copyright (c) 1996 by Internet Software Consortium.
     31 * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
     32 * Portions Copyright (c) 1996-1999 by Internet Software Consortium.
    3633 *
    3734 * Permission to use, copy, modify, and distribute this software for any
     
    3936 * copyright notice and this permission notice appear in all copies.
    4037 *
    41  * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
    42  * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
    43  * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
    44  * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
    45  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
    46  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
    47  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
    48  * SOFTWARE.
    49  */
    50 
    51 /*
     38 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
     39 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
     40 * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
     41 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
     42 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
     43 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
     44 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     45 */
     46
     47/*%
    5248 *      @(#)resolv.h    8.1 (Berkeley) 6/2/93
    53  *      From Id: resolv.h,v 8.12 1998/04/28 19:36:46 halley Exp $
    54  *      $Id$
     49 *      $Id: resolv.h,v 1.19.18.4 2008/04/03 23:15:15 marka Exp $
     50 * $FreeBSD: release/9.0.0/include/resolv.h 203964 2010-02-16 19:39:50Z imp $
    5551 */
    5652
     
    6460#include <netinet/in.h> /* struct in_addr */
    6561
    66 /*
     62/*%
    6763 * Revision information.  This is the release date in YYYYMMDD format.
    6864 * It can change every day so the right thing to do with it is use it
     
    7470#define __RES   19960801
    7571
    76 /*
     72/*%
    7773 * This used to be defined in res_query.c, now it's in herror.c.  It was
    7874 * never extern'd by any *.h file before it was placed here.  herror.c is
     
    8379extern int h_errno;
    8480
    85 /*
     81/*%
    8682 * Resolver configuration file.
    8783 * Normally not present, but may contain the address of the
     
    9389#endif
    9490
    95 /*
     91typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error }
     92        res_sendhookact;
     93
     94typedef res_sendhookact (*res_send_qhook)(struct sockaddr_in * const *ns,
     95                                              const u_char **query,
     96                                              int *querylen,
     97                                              u_char *ans,
     98                                              int anssiz,
     99                                              int *resplen);
     100
     101typedef res_sendhookact (*res_send_rhook)(const struct sockaddr_in *ns,
     102                                              const u_char *query,
     103                                              int querylen,
     104                                              u_char *ans,
     105                                              int anssiz,
     106                                              int *resplen);
     107
     108struct res_sym {
     109        int             number;    /*%< Identifying number, like T_MX */
     110        const char *    name;      /*%< Its symbolic name, like "MX" */
     111        const char *    humanname; /*%< Its fun name, like "mail exchanger" */
     112};
     113
     114/*%
    96115 * Global defines and variables for resolver stub.
    97116 */
    98 #define MAXNS                   3       /* max # name servers we'll track */
    99 #define MAXDFLSRCH              3       /* # default domain levels to try */
    100 #define MAXDNSRCH               6       /* max # domains in search path */
    101 #define LOCALDOMAINPARTS        2       /* min levels in name that is "local" */
    102 
    103 #define RES_TIMEOUT             5       /* min. seconds between retries */
    104 #define MAXRESOLVSORT           10      /* number of net to sort on */
    105 #define RES_MAXNDOTS            15      /* should reflect bit field size */
     117#define MAXNS                   3       /*%< max # name servers we'll track */
     118#define MAXDFLSRCH              3       /*%< # default domain levels to try */
     119#define MAXDNSRCH               6       /*%< max # domains in search path */
     120#define LOCALDOMAINPARTS        2       /*%< min levels in name that is "local" */
     121#define RES_TIMEOUT             5       /*%< min. seconds between retries */
     122#define MAXRESOLVSORT           10      /*%< number of net to sort on */
     123#define RES_MAXNDOTS            15      /*%< should reflect bit field size */
    106124
    107125struct __res_state {
    108         int     retrans;                /* retransmission time interval */
    109         int     retry;                  /* number of times to retransmit */
    110         u_long  options;                /* option flags - see below. */
    111         int     nscount;                /* number of name servers */
     126        int     retrans;                /*%< retransmission time interval */
     127        int     retry;                  /*%< number of times to retransmit */
     128        u_long  options;                /*%< option flags - see below. */
     129        int     nscount;                /*%< number of name servers */
    112130        struct sockaddr_in
    113                 nsaddr_list[MAXNS];     /* address of name server */
    114 #define nsaddr  nsaddr_list[0]          /* for backward compatibility */
    115         u_short id;                     /* current message id */
    116         char    *dnsrch[MAXDNSRCH+1];   /* components of domain to search */
    117         char    defdname[256];          /* default domain (deprecated) */
    118         u_long  pfcode;                 /* RES_PRF_ flags - see below. */
    119         unsigned ndots:4;               /* threshold for initial abs. query */
    120         unsigned nsort:4;               /* number of elements in sort_list[] */
     131                nsaddr_list[MAXNS];     /*%< address of name server */
     132#define nsaddr  nsaddr_list[0]          /*%< for backward compatibility */
     133        u_short id;                     /*%< current message id */
     134        char    *dnsrch[MAXDNSRCH+1];   /*%< components of domain to search */
     135        char    defdname[256];          /*%< default domain (deprecated) */
     136        u_long  pfcode;                 /*%< RES_PRF_ flags - see below. */
     137        unsigned ndots:4;               /*%< threshold for initial abs. query */
     138        unsigned nsort:4;               /*%< number of elements in sort_list[] */
    121139        char    unused[3];
    122140        struct {
     
    127145};
    128146
    129 /*
     147typedef struct __res_state *res_state;
     148
     149/*%
    130150 * Resolver options (keep these in synch with res_debug.c, please)
    131151 */
    132 #define RES_INIT        0x00000001      /* address initialized */
    133 #define RES_DEBUG       0x00000002      /* print debug messages */
    134 #define RES_AAONLY      0x00000004      /* authoritative answers only (!IMPL)*/
    135 #define RES_USEVC       0x00000008      /* use virtual circuit */
    136 #define RES_PRIMARY     0x00000010      /* query primary server only (!IMPL) */
    137 #define RES_IGNTC       0x00000020      /* ignore truncation errors */
    138 #define RES_RECURSE     0x00000040      /* recursion desired */
    139 #define RES_DEFNAMES    0x00000080      /* use default domain name */
    140 #define RES_STAYOPEN    0x00000100      /* Keep TCP socket open */
    141 #define RES_DNSRCH      0x00000200      /* search up local domain tree */
    142 #define RES_INSECURE1   0x00000400      /* type 1 security disabled */
    143 #define RES_INSECURE2   0x00000800      /* type 2 security disabled */
    144 #define RES_NOALIASES   0x00001000      /* shuts off HOSTALIASES feature */
    145 #define RES_USE_INET6   0x00002000      /* use/map IPv6 in gethostbyname() */
    146 #define RES_NOTLDQUERY  0x00004000      /* Don't query TLD names */
    147 
    148 #define RES_DEFAULT     (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
    149 
    150 /*
     152#define RES_INIT        0x00000001      /*%< address initialized */
     153#define RES_DEBUG       0x00000002      /*%< print debug messages */
     154#define RES_AAONLY      0x00000004      /*%< authoritative answers only (!IMPL)*/
     155#define RES_USEVC       0x00000008      /*%< use virtual circuit */
     156#define RES_PRIMARY     0x00000010      /*%< query primary server only (!IMPL) */
     157#define RES_IGNTC       0x00000020      /*%< ignore truncation errors */
     158#define RES_RECURSE     0x00000040      /*%< recursion desired */
     159#define RES_DEFNAMES    0x00000080      /*%< use default domain name */
     160#define RES_STAYOPEN    0x00000100      /*%< Keep TCP socket open */
     161#define RES_DNSRCH      0x00000200      /*%< search up local domain tree */
     162#define RES_INSECURE1   0x00000400      /*%< type 1 security disabled */
     163#define RES_INSECURE2   0x00000800      /*%< type 2 security disabled */
     164#define RES_NOALIASES   0x00001000      /*%< shuts off HOSTALIASES feature */
     165#define RES_USE_INET6   0x00002000      /*%< use/map IPv6 in gethostbyname() */
     166#define RES_NOTLDQUERY  0x00004000      /*%< Don't query TLD names */
     167
     168#define RES_DEFAULT     (RES_RECURSE | RES_DEFNAMES | \
     169                         RES_DNSRCH)
     170
     171/*%
    151172 * Resolver "pfcode" values.  Used by dig.
    152173 */
     
    165186#define RES_PRF_QUERY   0x00001000
    166187#define RES_PRF_REPLY   0x00002000
    167 #define RES_PRF_INIT    0x00004000
     188#define RES_PRF_INIT    0x00004000
    168189/*                      0x00008000      */
    169190
    170 typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error }
    171         res_sendhookact;
    172 
    173 typedef res_sendhookact (*res_send_qhook)(struct sockaddr_in * const *ns,
    174                                               const u_char **query,
    175                                               int *querylen,
    176                                               u_char *ans,
    177                                               int anssiz,
    178                                               int *resplen);
    179 
    180 typedef res_sendhookact (*res_send_rhook)(const struct sockaddr_in *ns,
    181                                               const u_char *query,
    182                                               int querylen,
    183                                               u_char *ans,
    184                                               int anssiz,
    185                                               int *resplen);
    186 
    187 struct res_sym {
    188         int     number;         /* Identifying number, like T_MX */
    189         char *  name;           /* Its symbolic name, like "MX" */
    190         char *  humanname;      /* Its fun name, like "mail exchanger" */
    191 };
     191#define fp_nquery               __fp_nquery
     192#define fp_query                __fp_query
     193#define hostalias               __hostalias
     194#define p_query                 __p_query
     195#define res_close               __res_close
     196#define res_init                __res_init
     197#define res_isourserver         __res_isourserver
     198#define res_mkquery             __res_mkquery
     199#define res_query               __res_query
     200#define res_querydomain         __res_querydomain
     201#define res_search              __res_search
     202#define res_send                __res_send
     203
     204__BEGIN_DECLS
     205void            fp_nquery(const u_char *, int, FILE *);
     206void            fp_query(const u_char *, FILE *);
     207const char *    hostalias(const char *);
     208void            p_query(const u_char *);
     209void            res_close(void);
     210int             res_init(void);
     211int             res_isourserver(const struct sockaddr_in *);
     212int             res_mkquery(int, const char *, int, int, const u_char *,
     213                                 int, const u_char *, u_char *, int);
     214int             res_query(const char *, int, int, u_char *, int);
     215int             res_querydomain(const char *, const char *, int, int,
     216                                     u_char *, int);
     217int             res_search(const char *, int, int, u_char *, int);
     218int             res_send(const u_char *, int, u_char *, int);
     219__END_DECLS
    192220
    193221extern struct __res_state _res;
     222
     223
    194224extern const struct res_sym __p_class_syms[];
    195225extern const struct res_sym __p_type_syms[];
    196226
    197227/* Private routines shared between libc/net, named, nslookup and others. */
    198 #define res_hnok        __res_hnok
    199 #define res_ownok       __res_ownok
    200 #define res_mailok      __res_mailok
    201 #define res_dnok        __res_dnok
    202 #define sym_ston        __sym_ston
    203 #define sym_ntos        __sym_ntos
    204 #define sym_ntop        __sym_ntop
    205 #define b64_ntop        __b64_ntop
    206 #define b64_pton        __b64_pton
    207 #define loc_ntoa        __loc_ntoa
    208 #define loc_aton        __loc_aton
    209 #define fp_resstat      __fp_resstat
    210 #define p_query         __p_query
    211 #define dn_skipname     __dn_skipname
    212 #define fp_resstat      __fp_resstat
    213 #define fp_query        __fp_query
    214 #define fp_nquery       __fp_nquery
    215 #define hostalias       __hostalias
    216 #define putlong         __putlong
    217 #define putshort        __putshort
    218 #define p_class         __p_class
    219 #define p_time          __p_time
    220 #define p_type          __p_type
    221 #define p_query         __p_query
    222 #define p_cdnname       __p_cdnname
    223 #define p_section       __p_section
    224 #define p_cdname        __p_cdname
    225 #define p_fqnname       __p_fqnname
    226 #define p_fqname        __p_fqname
    227 #define p_option        __p_option
    228 #define p_secstodate    __p_secstodate
    229 #define dn_count_labels __dn_count_labels
    230 #define dn_comp         __dn_comp
    231 #define dn_expand       __dn_expand
    232 #define res_init        __res_init
    233 #define res_randomid    __res_randomid
    234 #define res_query       __res_query
    235 #define res_search      __res_search
    236 #define res_querydomain __res_querydomain
    237 #define res_mkquery     __res_mkquery
    238 #define res_send        __res_send
    239 #define res_isourserver __res_isourserver
    240 #define res_nameinquery __res_nameinquery
    241 #define res_queriesmatch __res_queriesmatch
    242 #define res_close       __res_close
    243 #define res_mkupdate    __res_mkupdate
    244 #define res_mkupdrec    __res_mkupdrec
    245 #define res_freeupdrec  __res_freeupdrec
     228#define b64_ntop                __b64_ntop
     229#define b64_pton                __b64_pton
     230#define dn_comp                 __dn_comp
     231#define dn_count_labels         __dn_count_labels
     232#define dn_expand               __dn_expand
     233#define dn_skipname             __dn_skipname
     234#define fp_resstat              __fp_resstat
     235#define loc_aton                __loc_aton
     236#define loc_ntoa                __loc_ntoa
     237#define p_cdname                __p_cdname
     238#define p_cdnname               __p_cdnname
     239#define fp_resstat              __fp_resstat
     240#define p_class                 __p_class
     241#define p_fqname                __p_fqname
     242#define p_fqnname               __p_fqnname
     243#define p_option                __p_option
     244#define p_secstodate            __p_secstodate
     245#define p_section               __p_section
     246#define p_time                  __p_time
     247#define p_type                  __p_type
     248#define putlong                 __putlong
     249#define putshort                __putshort
     250#define res_dnok                __res_dnok
     251#define res_hnok                __res_hnok
     252#define res_mailok              __res_mailok
     253#define res_nameinquery         __res_nameinquery
     254#define res_ownok               __res_ownok
     255#define res_queriesmatch        __res_queriesmatch
     256#define res_randomid            __res_randomid
     257#define sym_ntop                __sym_ntop
     258#define sym_ntos                __sym_ntos
     259#define sym_ston                __sym_ston
     260#define res_send_setqhook       __res_send_setqhook
     261#define res_send_setrhook       __res_send_setrhook
     262#define res_mkupdate            __res_mkupdate
     263#define res_mkupdrec            __res_mkupdrec
     264#define res_freeupdrec          __res_freeupdrec
    246265
    247266__BEGIN_DECLS
    248 int             res_hnok (const char *);
    249 int             res_ownok (const char *);
    250 int             res_mailok (const char *);
    251 int             res_dnok (const char *);
    252 int             sym_ston (const struct res_sym *, const char *, int *);
    253 const char *    sym_ntos (const struct res_sym *, int, int *);
    254 const char *    sym_ntop (const struct res_sym *, int, int *);
    255 int             b64_ntop (u_char const *, size_t, char *, size_t);
    256 int             b64_pton (char const *, u_char *, size_t);
    257 int             loc_aton (const char *, u_char *);
    258 const char *    loc_ntoa (const u_char *, char *);
    259 int             dn_skipname (const u_char *, const u_char *);
    260 void            fp_resstat (struct __res_state *, FILE *);
    261 void            fp_query (const u_char *, FILE *);
    262 void            fp_nquery (const u_char *, int, FILE *);
    263 const char *    hostalias (const char *);
    264 void            putlong (u_int32_t, u_char *);
    265 void            putshort (u_int16_t, u_char *);
    266 const char *    p_class (int);
    267 const char *    p_time (u_int32_t);
    268 const char *    p_type (int);
    269 void            p_query (const u_char *);
    270 const u_char *  p_cdnname (const u_char *, const u_char *, int, FILE *);
    271 const u_char *  p_cdname (const u_char *, const u_char *, FILE *);
    272 const u_char *  p_fqnname (const u_char *, const u_char *,
    273                                int, char *, int);
    274 const u_char *  p_fqname (const u_char *, const u_char *, FILE *);
    275 const char *    p_option (u_long);
    276 char *          p_secstodate (u_long);
    277 int             dn_count_labels (const char *);
    278 int             dn_comp (const char *, u_char *, int,
    279                              u_char **, u_char **);
    280 int             dn_expand (const u_char *, const u_char *, const u_char *,
    281                                char *, int);
    282 int             res_init (void);
    283 u_int           res_randomid (void);
    284 int             res_query (const char *, int, int, u_char *, int);
    285 int             res_search (const char *, int, int, u_char *, int);
    286 int             res_querydomain (const char *, const char *, int, int,
    287                                      u_char *, int);
    288 int             res_mkquery (int, const char *, int, int, const u_char *,
    289                                  int, const u_char *, u_char *, int);
    290 int             res_send (const u_char *, int, u_char *, int);
    291 int             res_isourserver (const struct sockaddr_in *);
    292 int             res_nameinquery (const char *, int, int,
    293                                      const u_char *, const u_char *);
    294 int             res_queriesmatch (const u_char *, const u_char *,
    295                                       const u_char *, const u_char *);
    296 void            res_close (void);
    297 const char *    p_section (int, int);
     267int             res_hnok(const char *);
     268int             res_ownok(const char *);
     269int             res_mailok(const char *);
     270int             res_dnok(const char *);
     271int             sym_ston(const struct res_sym *, const char *, int *);
     272const char *    sym_ntos(const struct res_sym *, int, int *);
     273const char *    sym_ntop(const struct res_sym *, int, int *);
     274int             b64_ntop(u_char const *, size_t, char *, size_t);
     275int             b64_pton(char const *, u_char *, size_t);
     276int             loc_aton(const char *, u_char *);
     277const char *    loc_ntoa(const u_char *, char *);
     278int             dn_skipname(const u_char *, const u_char *);
     279void            fp_resstat(struct __res_state *, FILE *);
     280void            putlong(u_int32_t, u_char *);
     281void            putshort(u_int16_t, u_char *);
     282const char *    p_class(int);
     283const char *    p_time(u_int32_t);
     284const char *    p_type(int);
     285const u_char *  p_cdnname(const u_char *, const u_char *, int, FILE *);
     286const u_char *  p_cdname(const u_char *, const u_char *, FILE *);
     287const u_char *  p_fqnname(const u_char *, const u_char *, int, char *, int);
     288const u_char *  p_fqname(const u_char *, const u_char *, FILE *);
     289const char *    p_option(u_long);
     290char *          p_secstodate(u_long);
     291int             dn_count_labels(const char *);
     292int             dn_comp(const char *, u_char *, int, u_char **, u_char **);
     293int             dn_expand(const u_char *, const u_char *, const u_char *,
     294                          char *, int);
     295u_int           res_randomid(void);
     296int             res_nameinquery(const char *, int, int, const u_char *,
     297                                const u_char *);
     298int             res_queriesmatch(const u_char *, const u_char *,
     299                                 const u_char *, const u_char *);
     300const char *    p_section(int, int);
     301void            res_send_setqhook(res_send_qhook);
     302void            res_send_setrhook(res_send_rhook);
     303
    298304/* XXX The following depend on the ns_updrec typedef in arpa/nameser.h */
    299305#ifdef _ARPA_NAMESER_H_
  • cpukit/score/inline/rtems/score/rbtree.inl

    r47a45e5c r314d327  
    3131 *  @{
    3232 */
     33
     34/**
     35 * @brief Get the direction opposite to @a the_dir
     36 */
     37RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
     38  RBTree_Direction the_dir
     39)
     40{
     41  return (!the_dir);
     42}
    3343
    3444/** @brief Set off rbtree
     
    436446  RBTree_Node *c;
    437447  if (the_node == NULL) return;
    438   if (the_node->child[(1-dir)] == NULL) return;
    439 
    440   c = the_node->child[(1-dir)];
    441   the_node->child[(1-dir)] = c->child[dir];
     448  if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
     449
     450  c = the_node->child[_RBTree_Opposite_direction(dir)];
     451  the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
    442452
    443453  if (c->child[dir])
  • cpukit/score/src/rbtreeextract.c

    r47a45e5c r314d327  
    5151      dir = the_node != parent->child[0];
    5252      _RBTree_Rotate(parent, dir);
    53       sibling = parent->child[!dir];
     53      sibling = parent->child[_RBTree_Opposite_direction(dir)];
    5454    }
    5555
     
    7373       */
    7474      dir = the_node != parent->child[0];
    75       if (!_RBTree_Is_red(sibling->child[!dir])) {
     75      if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) {
    7676        sibling->color = RBT_RED;
    7777        sibling->child[dir]->color = RBT_BLACK;
    78         _RBTree_Rotate(sibling, !dir);
    79         sibling = parent->child[!dir];
     78        _RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir));
     79        sibling = parent->child[_RBTree_Opposite_direction(dir)];
    8080      }
    8181      sibling->color = parent->color;
    8282      parent->color = RBT_BLACK;
    83       sibling->child[!dir]->color = RBT_BLACK;
     83      sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK;
    8484      _RBTree_Rotate(parent, dir);
    8585      break; /* done */
  • testsuites/ChangeLog

    r47a45e5c r314d327  
     12011-03-02      Ralf Corsépius <ralf.corsepius@rtems.org>
     2
     3        * support/src/spin.c: Include "test_support.h".
     4
    152011-12-11      Ralf Corsépius <ralf.corsepius@rtems.org>
    26
  • testsuites/psxtmtests/ChangeLog

    r47a45e5c r314d327  
     12011-03-02      Ralf Corsépius <ralf.corsepius@rtems.org>
     2
     3        * psxtmmq01/init.c: Make benchmark_mq_open,
     4        benchmark_mq_open_second, benchmark_mq_close,
     5        benchmark_mq_close_second, benchmark_mq_unlink, benchmark_mq_notify,
     6        benchmark_mq_send, benchmark_mq_receive, benchmark_mq_timedsend,
     7        benchmark_mq_timedreceive static.
     8        * psxtmmutex01/init.c: Make test_mutex_create, test_mutex_destroy
     9        static.
     10        * psxtmsem02/init.c: benchmark_sem_getvalue, benchmark_sem_wait,
     11        benchmark_sem_post, benchmark_sem_trywait_available,
     12        benchmark_sem_trywait_not_available static.
     13
    1142011-12-13      Ralf Corsépius <ralf.corsepius@rtems.org>
    215
  • testsuites/psxtmtests/psxtmmq01/init.c

    r47a45e5c r314d327  
    2929const char *q_name;
    3030
    31 void benchmark_mq_open(int printable)
     31static void benchmark_mq_open(int printable)
    3232{
    3333  benchmark_timer_t end_time;
     
    5353}
    5454
    55 void benchmark_mq_open_second(int printable)
     55static void benchmark_mq_open_second(int printable)
    5656{
    5757  benchmark_timer_t end_time;
     
    7777}
    7878
    79 void benchmark_mq_close(int printable)
     79static void benchmark_mq_close(int printable)
    8080{
    8181  benchmark_timer_t end_time;
     
    9797}
    9898
    99 void benchmark_mq_close_second(int printable)
     99static void benchmark_mq_close_second(int printable)
    100100{
    101101  benchmark_timer_t end_time;
     
    117117}
    118118
    119 void benchmark_mq_unlink(void)
     119static void benchmark_mq_unlink(void)
    120120{
    121121  benchmark_timer_t end_time;
     
    136136}
    137137
    138 void benchmark_mq_notify(void)
     138static void benchmark_mq_notify(void)
    139139{
    140140  benchmark_timer_t end_time;
     
    159159}
    160160
    161 void benchmark_mq_send(void)
     161static void benchmark_mq_send(void)
    162162{
    163163  benchmark_timer_t end_time;
     
    179179}
    180180
    181 void benchmark_mq_receive(void)
     181static void benchmark_mq_receive(void)
    182182{
    183183  benchmark_timer_t end_time;
     
    201201}
    202202
    203 void benchmark_mq_timedsend(void)
     203static void benchmark_mq_timedsend(void)
    204204{
    205205  benchmark_timer_t end_time;
     
    225225}
    226226
    227 void benchmark_mq_timedreceive(void)
     227static void benchmark_mq_timedreceive(void)
    228228{
    229229  benchmark_timer_t end_time;
  • testsuites/psxtmtests/psxtmmutex01/init.c

    r47a45e5c r314d327  
    2222pthread_mutex_t MutexId;
    2323
    24 void test_mutex_create(void)
     24static void test_mutex_create(void)
    2525{
    2626  benchmark_timer_t end_time;
     
    4141}
    4242
    43 void test_mutex_destroy(void)
     43static void test_mutex_destroy(void)
    4444{
    4545  benchmark_timer_t end_time;
  • testsuites/psxtmtests/psxtmsem02/init.c

    r47a45e5c r314d327  
    2525sem_t           *n_sem1;
    2626
    27 void benchmark_sem_getvalue(void)
     27static void benchmark_sem_getvalue(void)
    2828{
    2929  benchmark_timer_t end_time;
     
    4545}
    4646
    47 void benchmark_sem_wait(void)
     47static void benchmark_sem_wait(void)
    4848{
    4949  benchmark_timer_t end_time;
     
    6464}
    6565
    66 void benchmark_sem_post(void)
     66static void benchmark_sem_post(void)
    6767{
    6868  benchmark_timer_t end_time;
     
    8383}
    8484
    85 void benchmark_sem_trywait_available(void)
     85static void benchmark_sem_trywait_available(void)
    8686{
    8787  benchmark_timer_t end_time;
     
    102102}
    103103
    104 void benchmark_sem_trywait_not_available(void)
     104static void benchmark_sem_trywait_not_available(void)
    105105{
    106106  benchmark_timer_t end_time;
  • testsuites/sptests/sprbtree01/init.c

    r47a45e5c r314d327  
    444444  puts( "INIT - Verify rtems_rbtree_predecessor/successor");
    445445  p = rtems_rbtree_predecessor(p);
    446   if(p && rtems_rbtree_container_of(p,test_node,Node)->id > 30) {
     446  if(p && rtems_rbtree_container_of(p,test_node,Node)->id != 29) {
    447447    puts ("INIT - ERROR ON RBTREE ID MISMATCH");
    448448    rtems_test_exit(0);
     
    450450  p = rtems_rbtree_find(&rbtree1, &search_node.Node);
    451451  p = rtems_rbtree_successor(p);
    452   if(p && rtems_rbtree_container_of(p,test_node,Node)->id < 30) {
     452  if(p && rtems_rbtree_container_of(p,test_node,Node)->id != 31) {
    453453    puts ("INIT - ERROR ON RBTREE ID MISMATCH");
    454454    rtems_test_exit(0);
  • testsuites/support/src/spin.c

    r47a45e5c r314d327  
    1515
    1616#include <rtems.h>
     17#include "test_support.h"
    1718
    1819/*
Note: See TracChangeset for help on using the changeset viewer.