Print this page
Move CallBack Server thread creation, initial processing and destruction to RPC
Cleanup some RPC code.
Remove extraneous fields from nfs41_cb_info and clean up the code.
Change KM_SLEEP in mir_nfs41_callback_thread to KM_NOSLEEP.
Fix lint warnings

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/rpc/svc.h
          +++ new/usr/src/uts/common/rpc/svc.h
↓ open down ↓ 11 lines elided ↑ open up ↑
  12   12   *
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22      - * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
       22 + * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
  25   25  /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
  26   26  /* All Rights Reserved */
  27   27  /*
  28   28   * Portions of this source code were derived from Berkeley
  29   29   * 4.3 BSD under license from the Regents of the University of
  30   30   * California.
  31   31   */
  32   32  
↓ open down ↓ 400 lines elided ↑ open up ↑
 433  433          int             xp_detached_threads; /* num. of detached threads */
 434  434          kmutex_t        xp_thread_lock; /* Thread count lock            */
 435  435          void            (*xp_closeproc)(const SVCMASTERXPRT *);
 436  436                                          /* optional; see comments above */
 437  437          char            *xp_netid;      /* network token                */
 438  438          struct netbuf   xp_addrmask;    /* address mask                 */
 439  439  
 440  440          caddr_t         xp_p2;          /* private: for use by svc ops  */
 441  441  };
 442  442  
 443      -#define SVCCB_DEAD      1       /* This callback is dead, don't accept on it */
      443 +#define SVCCB_NFS41_CB_THREAD_EXIT      0x01
 444  444  
 445  445  typedef struct __svccb {
 446  446          queue_t         *r_q;
 447  447          mblk_t          *r_mp;
 448  448          kmutex_t        r_lock;
 449      -        kmutex_t        r_mlock;
 450  449          kcondvar_t      r_cbwait;
      450 +        kcondvar_t      r_cbexit;
 451  451          int             r_flags;
 452  452          rpcprog_t       r_prog;
      453 +        kthread_t       *r_thread;
      454 +        SVC_DISPATCH    *r_dispatch;
 453  455  } SVCCB;
 454  456  
 455  457  typedef struct __svccb_args {
 456  458          SVCMASTERXPRT *xprt;
 457  459          rpcprog_t prog;
 458  460          rpcvers_t vers;
 459  461          int family;
 460  462          void *tag;
 461  463  } SVCCB_ARGS;
 462  464  
      465 +typedef struct __cbserver_args {
      466 +        SVC_DISPATCH    *callback;
      467 +        rpcprog_t       prog;
      468 +} CBSERVER_ARGS;
 463  469  
 464  470  /*
 465  471   * Service thread `clone' transport handle (SVCXPRT)
 466  472   *
 467  473   * PSARC 2003/523 Contract Private Interface
 468  474   * SVCXPRT
 469  475   * Changes must be reviewed by Solaris File Sharing
 470  476   * Changes must be communicated to contract-2003-523@sun.com
 471  477   *
 472  478   * The xp_p2buf buffer is used as the storage for a transport type
↓ open down ↓ 680 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX