Lines Matching defs:pos
786 * sysvipc_find_ipc - Find and lock the ipc structure based on seq pos
788 * @pos: expected position
791 * position @pos. If there is no ipc structure at position @pos, then
794 * ipc_lock_object()) and @pos is set to the position needed to locate
796 * If nothing is found (i.e. EOF), @pos is not modified.
800 static struct kern_ipc_perm *sysvipc_find_ipc(struct ipc_ids *ids, loff_t *pos)
806 tmpidx = *pos - 1;
814 *pos = tmpidx + 1;
819 static void *sysvipc_proc_next(struct seq_file *s, void *it, loff_t *pos)
829 /* Next -> search for *pos+1 */
830 (*pos)++;
831 return sysvipc_find_ipc(&iter->ns->ids[iface->ids], pos);
835 * File positions: pos 0 -> header, pos n -> ipc idx = n - 1.
838 static void *sysvipc_proc_start(struct seq_file *s, loff_t *pos)
852 /* pos < 0 is invalid */
853 if (*pos < 0)
856 /* pos == 0 means header */
857 if (*pos == 0)
861 return sysvipc_find_ipc(ids, pos);