Lines Matching defs:unsigned

29 static noinline bool __file_ref_put_badval(file_ref_t *ref, unsigned long cnt)
68 bool __file_ref_put(file_ref_t *ref, unsigned long cnt)
96 unsigned int sysctl_nr_open __read_mostly = 1024*1024;
97 unsigned int sysctl_nr_open_min = BITS_PER_LONG;
100 unsigned int sysctl_nr_open_max =
125 unsigned int copy_words)
127 unsigned int nwords = fdt_words(nfdt);
158 * 'unsigned long' in some places, but simply because that is how the Linux
160 * they are very much "bits in an array of unsigned long".
162 static struct fdtable *alloc_fdtable(unsigned int slots_wanted)
165 unsigned int nr;
252 static int expand_fdtable(struct files_struct *files, unsigned int nr)
288 static int expand_files(struct files_struct *files, unsigned int nr)
322 static inline void __set_close_on_exec(unsigned int fd, struct fdtable *fdt,
333 static inline void __set_open_fd(unsigned int fd, struct fdtable *fdt, bool set)
342 static inline void __clear_open_fd(unsigned int fd, struct fdtable *fdt)
350 static inline bool fd_is_open(unsigned int fd, const struct fdtable *fdt)
356 static unsigned long fd_range_word(struct fd_range *range, unsigned int i)
358 unsigned int first = i * BITS_PER_LONG;
359 unsigned int last = first + BITS_PER_LONG - 1;
368 static unsigned long dup_fd_dropped_word(struct fdtable *fdt, unsigned int i,
371 unsigned long dropped;
392 static unsigned int sane_fdtable_size(struct fdtable *fdt, struct fd_range *range)
394 unsigned int last = find_last_bit(fdt->open_fds, fdt->max_fds);
395 unsigned int i;
406 unsigned long dropped = dup_fd_dropped_word(fdt, i, range);
441 unsigned int open_files, fd;
442 unsigned long dropped = 0;
537 int unshare_fd(unsigned long unshare_flags, struct files_struct **new_fdp)
560 unsigned int j = fdt->max_fds / BITS_PER_LONG;
564 unsigned long set = fdt->open_fds[j];
567 unsigned int bit = __fls(set);
621 static unsigned int find_next_fd(struct fdtable *fdt, unsigned int start)
623 unsigned int maxfd = fdt->max_fds; /* always multiple of BITS_PER_LONG */
624 unsigned int max_fds_words = maxfd / BITS_PER_LONG;
625 unsigned int fds_word_idx = start / BITS_PER_LONG;
626 unsigned int bit;
646 static int alloc_fd(unsigned start, unsigned end, unsigned flags)
649 unsigned int fd;
691 int __get_unused_fd_flags(unsigned flags, unsigned long nofile)
696 int get_unused_fd_flags(unsigned flags)
702 static void __put_unused_fd(struct files_struct *files, unsigned int fd)
710 void put_unused_fd(unsigned int fd)
736 static void noinline fd_install_slowpath(unsigned int fd, struct file *file)
756 void fd_install(unsigned int fd, struct file *file)
791 struct file *file_close_fd_locked(struct files_struct *files, unsigned fd)
810 int close_fd(unsigned fd)
830 static inline unsigned last_fd(struct fdtable *fdt)
839 unsigned int last;
861 static inline unsigned int last_fd_to_close(struct fdtable *fdt, unsigned int n,
864 unsigned int i, lo = 0;
869 unsigned long set = fdt->open_fds[i];
873 unsigned int last = find_last_bit(fdt->open_fds, i * BITS_PER_LONG);
903 unsigned int fd, n;
954 SYSCALL_DEFINE3(close_range, unsigned int, fd, unsigned int, max_fd,
955 unsigned int, flags)
1025 struct file *file_close_fd(unsigned int fd)
1039 unsigned i;
1047 unsigned long set;
1055 unsigned int bit = __fls(set);
1056 unsigned fd = i * BITS_PER_LONG + bit;
1167 unsigned int fd, fmode_t mask)
1173 unsigned long nospec_mask;
1187 file = (void *)(nospec_mask & (unsigned long)file);
1242 static struct file *__fget_files(struct files_struct *files, unsigned int fd,
1254 static inline struct file *__fget(unsigned int fd, fmode_t mask)
1259 struct file *fget(unsigned int fd)
1265 struct file *fget_raw(unsigned int fd)
1271 struct file *fget_task(struct task_struct *task, unsigned int fd)
1283 struct file *fget_task_next(struct task_struct *task, unsigned int *ret_fd)
1286 unsigned int fd = *ret_fd;
1329 static inline struct fd __fget_light(unsigned int fd, fmode_t mask)
1355 struct fd fdget(unsigned int fd)
1361 struct fd fdget_raw(unsigned int fd)
1406 struct fd fdget_pos(unsigned int fd)
1429 void set_close_on_exec(unsigned int fd, int flag)
1437 bool get_close_on_exec(unsigned int fd)
1447 struct file *file, unsigned fd, unsigned flags)
1499 int replace_fd(unsigned fd, struct file *file, unsigned flags)
1539 int receive_fd(struct file *file, int __user *ufd, unsigned int o_flags)
1563 int receive_fd_replace(int new_fd, struct file *file, unsigned int o_flags)
1577 static int ksys_dup3(unsigned int oldfd, unsigned int newfd, int flags)
1611 SYSCALL_DEFINE3(dup3, unsigned int, oldfd, unsigned int, newfd, int, flags)
1616 SYSCALL_DEFINE2(dup2, unsigned int, oldfd, unsigned int, newfd)
1635 SYSCALL_DEFINE1(dup, unsigned int, fildes)
1650 int f_dupfd(unsigned int from, struct file *file, unsigned flags)
1652 unsigned long nofile = rlimit(RLIMIT_NOFILE);
1664 int iterate_fd(struct files_struct *files, unsigned n,
1665 int (*f)(const void *, struct file *, unsigned),