Print this page
*** NO COMMENTS ***

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libzpool/common/kernel.c
          +++ new/usr/src/lib/libzpool/common/kernel.c
↓ open down ↓ 248 lines elided ↑ open up ↑
 249  249  {
 250  250          VERIFY(cond_init(cv, type, NULL) == 0);
 251  251  }
 252  252  
 253  253  void
 254  254  cv_destroy(kcondvar_t *cv)
 255  255  {
 256  256          VERIFY(cond_destroy(cv) == 0);
 257  257  }
 258  258  
 259      -void
 260      -cv_wait(kcondvar_t *cv, kmutex_t *mp)
      259 +int
      260 +cv_wait_sig(kcondvar_t *cv, kmutex_t *mp)
 261  261  {
 262  262          ASSERT(mutex_owner(mp) == curthread);
 263  263          mp->m_owner = NULL;
 264  264          int ret = cond_wait(cv, &mp->m_lock);
 265  265          VERIFY(ret == 0 || ret == EINTR);
 266  266          mp->m_owner = curthread;
      267 +        return (ret == EINTR ? 0 : 1);
      268 +}
      269 +
      270 +void
      271 +cv_wait(kcondvar_t *cv, kmutex_t *mp)
      272 +{
      273 +        (void) cv_wait_sig(cv, mp);
 267  274  }
 268  275  
 269  276  clock_t
 270  277  cv_timedwait(kcondvar_t *cv, kmutex_t *mp, clock_t abstime)
 271  278  {
 272  279          int error;
 273  280          timestruc_t ts;
 274  281          clock_t delta;
 275  282  
 276  283  top:
↓ open down ↓ 709 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX