Lines Matching defs:ret
43 int ret;
52 if ((ret = mutex_init(&rw->mutex, USYNC_THREAD, 0)) != 0)
53 return (ret);
54 if ((ret = cond_init(&rw->cv, USYNC_THREAD, 0)) != 0)
55 return (ret);
108 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;
143 if ((ret = mutex_lock(&rw->mutex)) != 0)
144 return (ret);
152 ret = 0;
154 ret = EBUSY;
159 return (ret);
166 int ret;
182 if ((ret = mutex_lock(&rw->mutex)) != 0)
183 return (ret);
270 if ((ret = cond_wait(&rw->cv, &rw->mutex)) != 0) {
281 return (ret);
346 int ret;
364 if ((ret = mutex_lock(&rw->mutex)) != 0)
365 return (ret);
380 if ((ret = cond_wait(&rw->cv, &rw->mutex)) != 0) {
391 return (ret);
405 ret = mutex_unlock(&rw->mutex);
406 return ((rr == 0) ? ENOMEM : ret);
413 int ret;
427 if ((ret = mutex_lock(&rw->mutex)) != 0)
428 return (ret);
449 if ((ret = cond_broadcast(&rw->cv)) != 0) {
451 return (ret);
462 int ret;
479 if ((ret = mutex_lock(&rw->mutex)) != 0)
480 return (ret);
538 if ((ret = cond_broadcast(&rw->cv)) != 0) {
540 return (ret);
552 int ret;
565 if ((ret = mutex_lock(&rw->mutex)) != 0)
566 return (ret);
574 ret = mutex_unlock(&rw->mutex);
575 return ((ret == 0) ? -1 : ret);
591 int ret;
609 if ((ret = mutex_lock(&rw->mutex)) != 0)
610 return (ret);
637 ret = mutex_unlock(&rw->mutex);
638 return ((ret == 0) ? EBUSY : ret);
645 int ret;
659 if ((ret = mutex_lock(&rw->mutex)) != 0)
660 return (ret);