Lines Matching defs:ret
41 int ret;
50 if ((ret = mutex_init(&rw->mutex, USYNC_THREAD, 0)) != 0)
51 return (ret);
52 if ((ret = cond_init(&rw->cv, USYNC_THREAD, 0)) != 0)
53 return (ret);
106 int ret;
116 if ((ret = mutex_lock(&rw->mutex)) != 0)
117 return (ret);
125 ret = 0;
127 ret = EBUSY;
132 return (ret);
138 int ret;
145 if ((ret = mutex_lock(&rw->mutex)) != 0)
146 return (ret);
154 ret = 0;
156 ret = EBUSY;
161 return (ret);
168 int ret;
184 if ((ret = mutex_lock(&rw->mutex)) != 0)
185 return (ret);
271 if ((ret = cond_wait(&rw->cv, &rw->mutex)) != 0) {
282 return (ret);
347 int ret;
365 if ((ret = mutex_lock(&rw->mutex)) != 0)
366 return (ret);
381 if ((ret = cond_wait(&rw->cv, &rw->mutex)) != 0) {
392 return (ret);
406 ret = mutex_unlock(&rw->mutex);
407 return ((rr == 0) ? ENOMEM : ret);
414 int ret;
428 if ((ret = mutex_lock(&rw->mutex)) != 0)
429 return (ret);
450 if ((ret = cond_broadcast(&rw->cv)) != 0) {
452 return (ret);
463 int ret;
480 if ((ret = mutex_lock(&rw->mutex)) != 0)
481 return (ret);
539 if ((ret = cond_broadcast(&rw->cv)) != 0) {
541 return (ret);
553 int ret;
566 if ((ret = mutex_lock(&rw->mutex)) != 0)
567 return (ret);
575 ret = mutex_unlock(&rw->mutex);
576 return ((ret == 0) ? -1 : ret);
592 int ret;
610 if ((ret = mutex_lock(&rw->mutex)) != 0)
611 return (ret);
638 ret = mutex_unlock(&rw->mutex);
639 return ((ret == 0) ? EBUSY : ret);
646 int ret;
661 if ((ret = mutex_lock(&rw->mutex)) != 0)
662 return (ret);