Print this page
NEX-16818 Add fksmbcl development tool
NEX-17264 SMB client test tp_smbutil_013 fails after NEX-14666
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Matt Barden <matt.barden@nexenta.com>
and: (fix ref leaks)
NEX-5665 SMB2 oplock leases
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Roman Strashkin <roman.strashkin@nexenta.com>
NEX-5665 SMB2 oplock leases
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Roman Strashkin <roman.strashkin@nexenta.com>
SMB-50 User-mode SMB server
 Includes work by these authors:
 Thomas Keiser <thomas.keiser@nexenta.com>
 Albert Lee <trisk@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libfakekernel/common/rwlock.c
          +++ new/usr/src/lib/libfakekernel/common/rwlock.c
↓ open down ↓ 2 lines elided ↑ open up ↑
   3    3   * Common Development and Distribution License ("CDDL"), version 1.0.
   4    4   * You may only use this file in accordance with the terms of version
   5    5   * 1.0 of the CDDL.
   6    6   *
   7    7   * A full copy of the text of the CDDL should have accompanied this
   8    8   * source.  A copy of the CDDL is also available via the Internet at
   9    9   * http://www.illumos.org/license/CDDL.
  10   10   */
  11   11  
  12   12  /*
  13      - * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
       13 + * Copyright 2017 Nexenta Systems, Inc.  All rights reserved.
  14   14   */
  15   15  
  16   16  /*
  17   17   * rwlock(9f)
  18   18   */
  19   19  
  20   20  /* This is the API we're emulating */
  21   21  #include <sys/rwlock.h>
  22   22  
  23   23  #include <sys/errno.h>
  24   24  #include <sys/debug.h>
  25   25  #include <sys/param.h>
  26      -#include <sys/synch32.h>
  27   26  #include <sys/thread.h>
  28   27  
  29   28  /* avoiding synch.h */
  30   29  int     rwlock_init(lwp_rwlock_t *, int, void *);
  31   30  int     rwlock_destroy(lwp_rwlock_t *);
  32   31  int     rw_rdlock(lwp_rwlock_t *);
  33   32  int     rw_wrlock(lwp_rwlock_t *);
  34   33  int     rw_unlock(lwp_rwlock_t *);
  35   34  int     rw_tryrdlock(lwp_rwlock_t *);
  36   35  int     rw_trywrlock(lwp_rwlock_t *);
↓ open down ↓ 28 lines elided ↑ open up ↑
  65   64          }
  66   65          VERIFY(rc == 0);
  67   66  }
  68   67  
  69   68  void
  70   69  rw_exit(krwlock_t *rwlp)
  71   70  {
  72   71          if (_rw_write_held(&rwlp->rw_lock)) {
  73   72                  ASSERT(rwlp->rw_owner == _curthread());
  74   73                  rwlp->rw_owner = _KTHREAD_INVALID;
       74 +        } else {
       75 +                ASSERT(_rw_read_held(&rwlp->rw_lock));
  75   76          }
  76   77          (void) rw_unlock(&rwlp->rw_lock);
  77   78  }
  78   79  
  79   80  int
  80   81  rw_tryenter(krwlock_t *rwlp, krw_t rw)
  81   82  {
  82   83          int rv;
  83   84  
  84   85          if (rw == RW_WRITER) {
↓ open down ↓ 52 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX