Lines Matching refs:res
163 int res; in spair_delete() local
176 res = k_sem_take(&remote->sem, K_FOREVER); in spair_delete()
177 if (res == 0) { in spair_delete()
180 res = k_poll_signal_raise(&remote->readable, in spair_delete()
182 __ASSERT(res == 0, in spair_delete()
184 res); in spair_delete()
191 res = k_poll_signal_raise(&spair->writeable, SPAIR_SIG_CANCEL); in spair_delete()
192 __ASSERT(res == 0, "k_poll_signal_raise() failed: %d", res); in spair_delete()
221 int res; in spair_new() local
225 res = k_mem_slab_alloc(&spair_slab, (void **) &spair, K_NO_WAIT); in spair_new()
226 if (res != 0) { in spair_new()
258 res = k_poll_signal_raise(&spair->writeable, SPAIR_SIG_DATA); in spair_new()
259 __ASSERT(res == 0, "k_poll_signal_raise() failed: %d", res); in spair_new()
282 int res; in z_impl_zsock_socketpair() local
290 res = -1; in z_impl_zsock_socketpair()
296 res = -1; in z_impl_zsock_socketpair()
302 res = -1; in z_impl_zsock_socketpair()
309 res = -1; in z_impl_zsock_socketpair()
316 res = -1; in z_impl_zsock_socketpair()
341 return res; in z_impl_zsock_socketpair()
404 int res; in spair_write() local
416 res = -1; in spair_write()
420 res = k_sem_take(&spair->sem, K_NO_WAIT); in spair_write()
422 if (res < 0) { in spair_write()
425 res = -1; in spair_write()
429 res = k_sem_take(&spair->sem, K_FOREVER); in spair_write()
430 if (res < 0) { in spair_write()
431 errno = -res; in spair_write()
432 res = -1; in spair_write()
445 res = -1; in spair_write()
449 res = k_sem_take(&remote->sem, K_NO_WAIT); in spair_write()
450 if (res < 0) { in spair_write()
453 res = -1; in spair_write()
456 res = k_sem_take(&remote->sem, K_FOREVER); in spair_write()
457 if (res < 0) { in spair_write()
458 errno = -res; in spair_write()
459 res = -1; in spair_write()
471 res = -1; in spair_write()
480 res = -1; in spair_write()
497 res = k_poll(events, ARRAY_SIZE(events), K_FOREVER); in spair_write()
498 if (res < 0) { in spair_write()
499 errno = -res; in spair_write()
500 res = -1; in spair_write()
510 res = -1; in spair_write()
514 res = k_sem_take(&remote->sem, K_FOREVER); in spair_write()
515 if (res < 0) { in spair_write()
516 errno = -res; in spair_write()
517 res = -1; in spair_write()
536 res = -1; in spair_write()
553 res = k_pipe_put(&remote->recv_q, (void *)buffer, count, in spair_write()
555 __ASSERT(res == 0, "k_pipe_put() failed: %d", res); in spair_write()
561 res = k_poll_signal_raise(&remote->readable, SPAIR_SIG_DATA); in spair_write()
562 __ASSERT(res == 0, "k_poll_signal_raise() failed: %d", res); in spair_write()
564 res = bytes_written; in spair_write()
575 return res; in spair_write()
614 int res; in spair_read() local
625 res = -1; in spair_read()
629 res = k_sem_take(&spair->sem, K_NO_WAIT); in spair_read()
631 if (res < 0) { in spair_read()
634 res = -1; in spair_read()
638 res = k_sem_take(&spair->sem, K_FOREVER); in spair_read()
639 if (res < 0) { in spair_read()
640 errno = -res; in spair_read()
641 res = -1; in spair_read()
655 res = 0; in spair_read()
661 res = -1; in spair_read()
671 res = -1; in spair_read()
689 res = k_poll(events, ARRAY_SIZE(events), K_FOREVER); in spair_read()
690 __ASSERT(res == 0, "k_poll() failed: %d", res); in spair_read()
692 res = k_sem_take(&spair->sem, K_FOREVER); in spair_read()
693 __ASSERT(res == 0, "failed to take local sem: %d", res); in spair_read()
710 res = -1; in spair_read()
727 res = k_pipe_get(&spair->recv_q, (void *)buffer, count, &bytes_read, in spair_read()
729 __ASSERT(res == 0, "k_pipe_get() failed: %d", res); in spair_read()
736 res = k_poll_signal_raise(&spair->writeable, SPAIR_SIG_DATA); in spair_read()
737 __ASSERT(res == 0, "k_poll_signal_raise() failed: %d", res); in spair_read()
740 res = bytes_read; in spair_read()
748 return res; in spair_read()
756 int res; in zsock_poll_prepare_ctx() local
765 res = -EALREADY; in zsock_poll_prepare_ctx()
770 res = -ENOMEM; in zsock_poll_prepare_ctx()
782 res = -EALREADY; in zsock_poll_prepare_ctx()
787 res = -ENOMEM; in zsock_poll_prepare_ctx()
797 res = k_sem_take(&remote->sem, K_FOREVER); in zsock_poll_prepare_ctx()
798 if (res < 0) { in zsock_poll_prepare_ctx()
814 res = 0; in zsock_poll_prepare_ctx()
822 return res; in zsock_poll_prepare_ctx()
829 int res; in zsock_poll_update_ctx() local
846 res = k_sem_take(&remote->sem, K_FOREVER); in zsock_poll_update_ctx()
847 if (res < 0) { in zsock_poll_update_ctx()
901 res = 0; in zsock_poll_update_ctx()
909 return res; in zsock_poll_update_ctx()
914 int res; in spair_ioctl() local
924 res = -1; in spair_ioctl()
932 res = k_sem_take(&spair->sem, K_FOREVER); in spair_ioctl()
933 __ASSERT(res == 0, "failed to take local sem: %d", res); in spair_ioctl()
943 res = flags; in spair_ioctl()
956 res = 0; in spair_ioctl()
962 res = 0; in spair_ioctl()
972 res = 0; in spair_ioctl()
981 res = zsock_poll_prepare_ctx(obj, pfd, pev, pev_end); in spair_ioctl()
989 res = zsock_poll_update_ctx(obj, pfd, pev); in spair_ioctl()
995 res = -1; in spair_ioctl()
1005 return res; in spair_ioctl()
1066 int res; in spair_sendmsg() local
1075 res = -1; in spair_sendmsg()
1091 res = -1; in spair_sendmsg()
1096 res = 0; in spair_sendmsg()
1102 res = -1; in spair_sendmsg()
1107 res = spair_write(spair, msg->msg_iov[i].iov_base, in spair_sendmsg()
1109 if (res == -1) { in spair_sendmsg()
1114 res = len; in spair_sendmsg()
1117 return res; in spair_sendmsg()
1173 int res; in spair_close() local
1175 res = k_sem_take(&spair->sem, K_FOREVER); in spair_close()
1176 __ASSERT(res == 0, "failed to take local sem: %d", res); in spair_close()