Changeset 73a8881 in rtems-libbsd


Ignore:
Timestamp:
May 1, 2012, 6:52:03 PM (7 years ago)
Author:
Jennifer Averett <jennifer.averett@…>
Branches:
4.11, eeb3fd5d9b07ac9a2e280cff60a1b762bd273a8d, freebsd-9.3, 1e989998de954bef51e6c19cc3d64d39f32100aa
Children:
be8032d
Parents:
c1dd641
Message:

Added rtems_bsd_thread0_ucred as a single global ucred.

Location:
freebsd
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • freebsd/kern/init_main.c

    rc1dd641 r73a8881  
    119119 * If we want to register new sysinit types, add them to newsysinit.
    120120 */
     121#else  /* __rtems__ */
     122struct ucred *rtems_bsd_thread0_ucred;
    121123#endif /* __rtems__ */
    122124SET_DECLARE(sysinit_set, struct sysinit);
     
    192194        if (boothowto & RB_VERBOSE)
    193195                bootverbose++;
     196#else  /* __rtems__ */
     197        rtems_bsd_thread0_ucred = crget();
     198        rtems_bsd_thread0_ucred->cr_ngroups = 1;        /* group 0 */
     199        rtems_bsd_thread0_ucred->cr_uidinfo = uifind(0);
     200        rtems_bsd_thread0_ucred = uifind(0);
     201        rtems_bsd_thread0_ucred->cr_prison = &prison0;
     202
    194203#endif /* __rtems__ */
    195204
  • freebsd/netinet/tcp_syncache.c

    rc1dd641 r73a8881  
    731731                if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr))
    732732                        inp->in6p_laddr = sc->sc_inc.inc6_laddr;
     733#ifndef __rtems__
    733734                if ((error = in6_pcbconnect(inp, (struct sockaddr *)&sin6,
    734735                    thread0.td_ucred)) != 0) {
     736#else  /*  __rtems__ */
     737                if ((error = in6_pcbconnect(inp, (struct sockaddr *)&sin6,
     738                    rtems_bsd_thread0_ucred)) != 0) {
     739#endif  /*  __rtems__ */
    735740                        inp->in6p_laddr = laddr6;
    736741                        if ((s = tcp_log_addrs(&sc->sc_inc, NULL, NULL, NULL))) {
     
    766771                if (inp->inp_laddr.s_addr == INADDR_ANY)
    767772                        inp->inp_laddr = sc->sc_inc.inc_laddr;
     773#ifndef __rtems__
    768774                if ((error = in_pcbconnect(inp, (struct sockaddr *)&sin,
    769775                    thread0.td_ucred)) != 0) {
     776#else  /*  __rtems__ */
     777                if ((error = in_pcbconnect(inp, (struct sockaddr *)&sin,
     778                    rtems_bsd_thread0_ucred)) != 0) {
     779#endif  /*  __rtems__ */
     780
    770781                        inp->inp_laddr = laddr;
    771782                        if ((s = tcp_log_addrs(&sc->sc_inc, NULL, NULL, NULL))) {
  • freebsd/sys/proc.h

    rc1dd641 r73a8881  
    797797extern struct mtx ppeers_lock;
    798798extern struct proc proc0;               /* Process slot for swapper. */
     799#ifndef __rtems__
    799800extern struct thread thread0;           /* Primary thread in proc0. */
     801#else  /*  __rtems__ */
     802extern struct ucred *rtems_bsd_thread0_ucred;
     803#endif  /*  __rtems__ */
    800804extern struct vmspace vmspace0;         /* VM space for proc0. */
    801805extern int hogticks;                    /* Limit on kernel cpu hogs. */
Note: See TracChangeset for help on using the changeset viewer.