• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/ofed/librdmacm/

Lines Matching refs:index

256 	int ret, index;
262 index = open("/dev/null", O_RDONLY);
263 if (index < 0) {
264 ret = index;
271 ret = idm_set(&idm, index, fdi);
276 return index;
279 real.close(index);
285 static void fd_store(int index, int fd, enum fd_type type, enum fd_fork_state state)
289 fdi = idm_at(&idm, index);
295 static inline enum fd_type fd_get(int index, int *fd)
299 fdi = idm_lookup(&idm, index);
305 *fd = index;
310 static inline int fd_getd(int index)
314 fdi = idm_lookup(&idm, index);
315 return fdi ? fdi->fd : index;
318 static inline enum fd_fork_state fd_gets(int index)
322 fdi = idm_lookup(&idm, index);
326 static inline enum fd_type fd_gett(int index)
330 fdi = idm_lookup(&idm, index);
334 static enum fd_type fd_close(int index, int *fd)
339 fdi = idm_lookup(&idm, index);
341 idm_clear(&idm, index);
344 real.close(index);
347 *fd = index;
533 int index, ret;
540 index = fd_open();
541 if (index < 0)
542 return index;
549 fd_store(index, ret, fd_normal, fd_fork);
550 return index;
557 fd_store(index, ret, fd_rsocket, fd_ready);
559 return index;
561 fd_close(index, &ret);
588 int fd, index, ret;
591 index = fd_open();
592 if (index < 0)
593 return index;
597 fd_close(index, &fd);
601 fd_store(index, ret, fd_rsocket, fd_ready);
602 return index;
604 index = fd_open();
605 if (index < 0)
606 return index;
610 fd_close(index, &fd);
614 fd_store(index, ret, fd_normal, fd_fork_passive);
615 return index;
746 static inline enum fd_type fd_fork_get(int index, int *fd)
750 fdi = idm_lookup(&idm, index);
753 fork_passive(index);
755 fork_active(index);
760 *fd = index;