Lines Matching defs:module

1 /* POSIX module implementation */
4 module actually calls itself 'nt', not 'posix', and a few
218 "This module provides access to operating system functionality that is\n\
363 module os
1006 get_posix_state(PyObject *module)
1008 void *state = _PyModule_GetState(module);
1016 * preferred by the os module.
2316 _posix_clear(PyObject *module)
2318 _posixstate *state = get_posix_state(module);
2341 _posix_traverse(PyObject *module, visitproc visit, void *arg)
2343 _posixstate *state = get_posix_state(module);
2366 _posix_free(void *module)
2368 _posix_clear((PyObject *)module);
2372 fill_time(PyObject *module, PyObject *v, int index, time_t sec, unsigned long nsec)
2383 s_in_ns = PyNumber_Multiply(s, get_posix_state(module)->billion);
2413 _pystat_fromstructstat(PyObject *module, STRUCT_STAT *st)
2416 PyObject *StatResultType = get_posix_state(module)->StatResultType;
2457 fill_time(module, v, 7, st->st_atime, ansec);
2458 fill_time(module, v, 8, st->st_mtime, mnsec);
2459 fill_time(module, v, 9, st->st_ctime, cnsec);
2521 posix_do_stat(PyObject *module, const char *function_name, path_t *path,
2582 return _pystat_fromstructstat(module, &st);
2908 os_stat_impl(PyObject *module, path_t *path, int dir_fd, int follow_symlinks)
2911 return posix_do_stat(module, "stat", path, dir_fd, follow_symlinks);
2931 os_lstat_impl(PyObject *module, path_t *path, int dir_fd)
2935 return posix_do_stat(module, "lstat", path, dir_fd, follow_symlinks);
2979 os_access_impl(PyObject *module, path_t *path, int mode, int dir_fd,
3096 os_ttyname_impl(PyObject *module, int fd)
3128 os_ctermid_impl(PyObject *module)
3159 os_chdir_impl(PyObject *module, path_t *path)
3204 os_fchdir_impl(PyObject *module, int fd)
3248 os_chmod_impl(PyObject *module, path_t *path, int mode, int dir_fd,
3388 os_fchmod_impl(PyObject *module, int fd, int mode)
3425 os_lchmod_impl(PyObject *module, path_t *path, int mode)
3463 os_chflags_impl(PyObject *module, path_t *path, unsigned long flags,
3509 os_lchflags_impl(PyObject *module, path_t *path, unsigned long flags)
3537 os_chroot_impl(PyObject *module, path_t *path)
3561 os_fsync_impl(PyObject *module, int fd)
3577 os_sync_impl(PyObject *module)
3602 os_fdatasync_impl(PyObject *module, int fd)
3651 os_chown_impl(PyObject *module, path_t *path, uid_t uid, gid_t gid,
3731 os_fchown_impl(PyObject *module, int fd, uid_t uid, gid_t gid)
3769 os_lchown_impl(PyObject *module, path_t *path, uid_t uid, gid_t gid)
3893 os_getcwd_impl(PyObject *module)
3907 os_getcwdb_impl(PyObject *module)
3944 os_link_impl(PyObject *module, path_t *src, path_t *dst, int src_dir_fd,
4271 os_listdir_impl(PyObject *module, path_t *path)
4338 os__getfullpathname_impl(PyObject *module, path_t *path)
4372 os__getfinalpathname_impl(PyObject *module, path_t *path)
4450 os__getvolumepathname_impl(PyObject *module, path_t *path)
4498 os__path_splitroot_impl(PyObject *module, path_t *path)
4547 os__path_normpath_impl(PyObject *module, PyObject *path)
4592 os_mkdir_impl(PyObject *module, path_t *path, int mode, int dir_fd)
4695 os_nice_impl(PyObject *module, int increment)
4735 os_getpriority_impl(PyObject *module, int which, int who)
4761 os_setpriority_impl(PyObject *module, int which, int who, int priority)
4868 os_rename_impl(PyObject *module, path_t *src, path_t *dst, int src_dir_fd,
4889 os_replace_impl(PyObject *module, path_t *src, path_t *dst, int src_dir_fd,
4913 os_rmdir_impl(PyObject *module, path_t *path, int dir_fd)
4970 os_system_impl(PyObject *module, const Py_UNICODE *command)
4996 os_system_impl(PyObject *module, PyObject *command)
5026 os_umask_impl(PyObject *module, int mask)
5093 os_unlink_impl(PyObject *module, path_t *path, int dir_fd)
5153 os_remove_impl(PyObject *module, path_t *path, int dir_fd)
5156 return os_unlink_impl(module, path, dir_fd);
5196 os_uname_impl(PyObject *module)
5209 PyObject *UnameResultType = get_posix_state(module)->UnameResultType;
5439 split_py_long_to_s_and_ns(PyObject *module, PyObject *py_long, time_t *s, long *ns)
5443 divmod = PyNumber_Divmod(py_long, get_posix_state(module)->billion);
5505 os_utime_impl(PyObject *module, path_t *path, PyObject *times, PyObject *ns,
5555 if (!split_py_long_to_s_and_ns(module, PyTuple_GET_ITEM(ns, 0),
5557 !split_py_long_to_s_and_ns(module, PyTuple_GET_ITEM(ns, 1),
5677 os__exit_impl(PyObject *module, int status)
5870 os_execv_impl(PyObject *module, path_t *path, PyObject *argv)
5935 os_execve_impl(PyObject *module, path_t *path, PyObject *argv, PyObject *env)
6017 convert_sched_param(PyObject *module, PyObject *param, struct sched_param *res);
6021 parse_posix_spawn_flags(PyObject *module, const char *func_name, PyObject *setpgroup,
6118 if (!convert_sched_param(module, schedparam_obj, &schedparam)) {
6273 py_posix_spawn(int use_posix_spawnp, PyObject *module, path_t *path, PyObject *argv,
6347 if (parse_posix_spawn_flags(module, func_name, setpgroup, resetids, setsid,
6429 os_posix_spawn_impl(PyObject *module, path_t *path, PyObject *argv,
6436 return py_posix_spawn(0, module, path, argv, env, file_actions,
6475 os_posix_spawnp_impl(PyObject *module, path_t *path, PyObject *argv,
6482 return py_posix_spawn(1, module, path, argv, env, file_actions,
6538 os_spawnv_impl(PyObject *module, int mode, path_t *path, PyObject *argv)
6640 os_spawnve_impl(PyObject *module, int mode, path_t *path, PyObject *argv,
6782 os_register_at_fork_impl(PyObject *module, PyObject *before,
6823 os_fork1_impl(PyObject *module)
6858 os_fork_impl(PyObject *module)
6898 os_sched_get_priority_max_impl(PyObject *module, int policy)
6919 os_sched_get_priority_min_impl(PyObject *module, int policy)
6942 os_sched_getscheduler_impl(PyObject *module, pid_t pid)
6997 convert_sched_param(PyObject *module, PyObject *param, struct sched_param *res)
7001 if (!Py_IS_TYPE(param, (PyTypeObject *)get_posix_state(module)->SchedParamType)) {
7034 os_sched_setscheduler_impl(PyObject *module, pid_t pid, int policy,
7039 if (!convert_sched_param(module, param_obj, &param)) {
7068 os_sched_getparam_impl(PyObject *module, pid_t pid)
7077 PyObject *SchedParamType = get_posix_state(module)->SchedParamType;
7104 os_sched_setparam_impl(PyObject *module, pid_t pid, PyObject *param_obj)
7108 if (!convert_sched_param(module, param_obj, &param)) {
7131 os_sched_rr_get_interval_impl(PyObject *module, pid_t pid)
7154 os_sched_yield_impl(PyObject *module)
7183 os_sched_setaffinity_impl(PyObject *module, pid_t pid, PyObject *mask)
7282 os_sched_getaffinity_impl(PyObject *module, pid_t pid)
7376 os_openpty_impl(PyObject *module)
7484 os_login_tty_impl(PyObject *module, int fd)
7528 os_forkpty_impl(PyObject *module)
7566 os_getegid_impl(PyObject *module)
7582 os_geteuid_impl(PyObject *module)
7598 os_getgid_impl(PyObject *module)
7614 os_getpid_impl(PyObject *module)
7644 os_getgrouplist_impl(PyObject *module, const char *user, int basegid)
7660 os_getgrouplist_impl(PyObject *module, const char *user, gid_t basegid)
7758 os_getgroups_impl(PyObject *module)
7822 os_initgroups_impl(PyObject *module, PyObject *oname, int gid)
7840 os_initgroups_impl(PyObject *module, PyObject *oname, gid_t gid)
7864 os_getpgid_impl(PyObject *module, pid_t pid)
7883 os_getpgrp_impl(PyObject *module)
7903 os_setpgrp_impl(PyObject *module)
7971 os_getppid_impl(PyObject *module)
7991 os_getlogin_impl(PyObject *module)
8034 os_getuid_impl(PyObject *module)
8058 os_kill_impl(PyObject *module, pid_t pid, Py_ssize_t signal)
8129 os_killpg_impl(PyObject *module, pid_t pgid, int signal)
8138 int (else compilation of this module fails), which is safe. */
8160 os_plock_impl(PyObject *module, int op)
8181 os_setuid_impl(PyObject *module, uid_t uid)
8202 os_seteuid_impl(PyObject *module, uid_t euid)
8223 os_setegid_impl(PyObject *module, gid_t egid)
8245 os_setreuid_impl(PyObject *module, uid_t ruid, uid_t euid)
8269 os_setregid_impl(PyObject *module, gid_t rgid, gid_t egid)
8289 os_setgid_impl(PyObject *module, gid_t gid)
8310 os_setgroups(PyObject *module, PyObject *groups)
8361 wait_helper(PyObject *module, pid_t pid, int status, struct rusage *ru)
8378 struct_rusage = PyObject_GetAttr(m, get_posix_state(module)->struct_rusage);
8437 os_wait3_impl(PyObject *module, int options)
8454 return wait_helper(module, pid, WAIT_STATUS_INT(status), &ru);
8474 os_wait4_impl(PyObject *module, pid_t pid, int options)
8491 return wait_helper(module, res, WAIT_STATUS_INT(status), &ru);
8516 os_waitid_impl(PyObject *module, idtype_t idtype, id_t id, int options)
8536 PyObject *WaitidResultType = get_posix_state(module)->WaitidResultType;
8572 os_waitpid_impl(PyObject *module, pid_t pid, int options)
8607 os_waitpid_impl(PyObject *module, intptr_t pid, int options)
8643 os_wait_impl(PyObject *module)
8676 os_pidfd_open_impl(PyObject *module, pid_t pid, unsigned int flags)
8706 os_readlink_impl(PyObject *module, path_t *path, int dir_fd)
8919 os_symlink_impl(PyObject *module, path_t *src, path_t *dst,
9058 build_times_result(PyObject *module, double user, double system,
9062 PyObject *TimesResultType = get_posix_state(module)->TimesResultType;
9105 os_times_impl(PyObject *module)
9118 return build_times_result(module,
9137 return build_times_result(module,
9159 os_getsid_impl(PyObject *module, pid_t pid)
9179 os_setsid_impl(PyObject *module)
9201 os_setpgid_impl(PyObject *module, pid_t pid, pid_t pgrp)
9222 os_tcgetpgrp_impl(PyObject *module, int fd)
9245 os_tcsetpgrp_impl(PyObject *module, int fd, pid_t pgid)
9280 os_open_impl(PyObject *module, path_t *path, int flags, int mode, int dir_fd)
9361 os_close_impl(PyObject *module, int fd)
9390 os_closerange_impl(PyObject *module, int fd_low, int fd_high)
9410 os_dup_impl(PyObject *module, int fd)
9429 os_dup2_impl(PyObject *module, int fd, int fd2, int inheritable)
9533 os_lockf_impl(PyObject *module, int fd, int command, Py_off_t length)
9569 os_lseek_impl(PyObject *module, int fd, Py_off_t position, int how)
9609 os_read_impl(PyObject *module, int fd, Py_ssize_t length)
9716 os_readv_impl(PyObject *module, int fd, PyObject *buffers)
9771 os_pread_impl(PyObject *module, int fd, Py_ssize_t length, Py_off_t offset)
9832 os_preadv_impl(PyObject *module, int fd, PyObject *buffers, Py_off_t offset,
9873 /* This entire function will be removed from the module dict when the API
9917 os_write_impl(PyObject *module, int fd, Py_buffer *data)
9940 os_sendfile_impl(PyObject *module, int out_fd, int in_fd, Py_off_t offset,
9960 os_sendfile_impl(PyObject *module, int out_fd, int in_fd, Py_off_t offset,
9977 os_sendfile_impl(PyObject *module, int out_fd, int in_fd, PyObject *offobj,
10168 os__fcopyfile_impl(PyObject *module, int in_fd, int out_fd, int flags)
10195 os_fstat_impl(PyObject *module, int fd)
10215 return _pystat_fromstructstat(module, &st);
10231 os_isatty_impl(PyObject *module, int fd)
10255 os_pipe_impl(PyObject *module)
10342 os_pipe2_impl(PyObject *module, int flags)
10370 os_writev_impl(PyObject *module, int fd, PyObject *buffers)
10424 os_pwrite_impl(PyObject *module, int fd, Py_buffer *buffer, Py_off_t offset)
10473 os_pwritev_impl(PyObject *module, int fd, PyObject *buffers, Py_off_t offset,
10515 /* This entire function will be removed from the module dict when the API
10570 os_copy_file_range_impl(PyObject *module, int src, int dst, Py_ssize_t count,
10642 os_splice_impl(PyObject *module, int src, int dst, Py_ssize_t count,
10704 os_mkfifo_impl(PyObject *module, path_t *path, int mode, int dir_fd)
10772 os_mknod_impl(PyObject *module, path_t *path, int mode, dev_t device,
10824 os_major_impl(PyObject *module, dev_t device)
10841 os_minor_impl(PyObject *module, dev_t device)
10859 os_makedev_impl(PyObject *module, int major, int minor)
10879 os_ftruncate_impl(PyObject *module, int fd, Py_off_t length)
10921 os_truncate_impl(PyObject *module, path_t *path, Py_off_t length)
10930 return os_ftruncate_impl(module, path->fd, length);
10986 os_posix_fallocate_impl(PyObject *module, int fd, Py_off_t offset,
11033 os_posix_fadvise_impl(PyObject *module, int fd, Py_off_t offset,
11128 os_putenv_impl(PyObject *module, PyObject *name, PyObject *value)
11148 os_putenv_impl(PyObject *module, PyObject *name, PyObject *value)
11181 os_unsetenv_impl(PyObject *module, PyObject *name)
11199 os_unsetenv_impl(PyObject *module, PyObject *name)
11229 os_strerror_impl(PyObject *module, int code)
11254 os_WCOREDUMP_impl(PyObject *module, int status)
11277 os_WIFCONTINUED_impl(PyObject *module, int status)
11297 os_WIFSTOPPED_impl(PyObject *module, int status)
11317 os_WIFSIGNALED_impl(PyObject *module, int status)
11337 os_WIFEXITED_impl(PyObject *module, int status)
11357 os_WEXITSTATUS_impl(PyObject *module, int status)
11377 os_WTERMSIG_impl(PyObject *module, int status)
11397 os_WSTOPSIG_impl(PyObject *module, int status)
11417 _pystatvfs_fromstructstatvfs(PyObject *module, struct statvfs st) {
11418 PyObject *StatVFSResultType = get_posix_state(module)->StatVFSResultType;
11479 os_fstatvfs_impl(PyObject *module, int fd)
11495 return _pystatvfs_fromstructstatvfs(module, st);
11515 os_statvfs_impl(PyObject *module, path_t *path)
11535 return _pystatvfs_fromstructstatvfs(module, st);
11550 os__getdiskusage_impl(PyObject *module, path_t *path)
11595 * magic names instead of polluting the module's namespace with tons of
11764 os_fpathconf_impl(PyObject *module, int fd, int name)
11793 os_pathconf_impl(PyObject *module, path_t *path, int name)
11990 os_confstr_impl(PyObject *module, int name)
12546 os_sysconf_impl(PyObject *module, int name)
12583 const char *tablename, PyObject *module)
12602 return PyModule_AddObject(module, tablename, d);
12607 setup_confname_tables(PyObject *module)
12613 "pathconf_names", module))
12620 "confstr_names", module))
12627 "sysconf_names", module))
12644 os_abort_impl(PyObject *module)
12726 os_startfile_impl(PyObject *module, path_t *filepath,
12775 os_getloadavg_impl(PyObject *module)
12799 os_device_encoding_impl(PyObject *module, int fd)
12819 os_setresuid_impl(PyObject *module, uid_t ruid, uid_t euid, uid_t suid)
12842 os_setresgid_impl(PyObject *module, gid_t rgid, gid_t egid, gid_t sgid)
12860 os_getresuid_impl(PyObject *module)
12881 os_getresgid_impl(PyObject *module)
12913 os_getxattr_impl(PyObject *module, path_t *path, path_t *attribute,
12989 os_setxattr_impl(PyObject *module, path_t *path, path_t *attribute,
13042 os_removexattr_impl(PyObject *module, path_t *path, path_t *attribute,
13089 os_listxattr_impl(PyObject *module, path_t *path, int follow_symlinks)
13188 os_urandom_impl(PyObject *module, Py_ssize_t size)
13219 os_memfd_create_impl(PyObject *module, PyObject *name, unsigned int flags)
13245 os_eventfd_impl(PyObject *module, unsigned int initval, int flags)
13269 os_eventfd_read_impl(PyObject *module, int fd)
13293 os_eventfd_write_impl(PyObject *module, int fd, unsigned long long value)
13348 os_get_terminal_size_impl(PyObject *module, int fd)
13401 PyObject *TerminalSizeType = get_posix_state(module)->TerminalSizeType;
13427 os_cpu_count_impl(PyObject *module)
13468 os_get_inheritable_impl(PyObject *module, int fd)
13489 os_set_inheritable_impl(PyObject *module, int fd, int inheritable)
13513 os_get_handle_inheritable_impl(PyObject *module, intptr_t handle)
13537 os_set_handle_inheritable_impl(PyObject *module, intptr_t handle,
13562 os_get_blocking_impl(PyObject *module, int fd)
13586 os_set_blocking_impl(PyObject *module, int fd, int blocking)
13670 DirEntry_fetch_stat(PyObject *module, DirEntry *self, int follow_symlinks)
13729 return _pystat_fromstructstat(module, &st);
13736 PyObject *module = PyType_GetModule(defining_class);
13738 self->lstat = _pystat_fromstructstat(module, &self->win32_lstat);
13740 self->lstat = DirEntry_fetch_stat(module, self, 0);
13772 PyObject *module = PyType_GetModule(defining_class);
13773 self->stat = DirEntry_fetch_stat(module, self, 1);
14043 DirEntry_from_find_data(PyObject *module, path_t *path, WIN32_FIND_DATAW *dataW)
14050 PyObject *DirEntryType = get_posix_state(module)->DirEntryType;
14128 DirEntry_from_posix_info(PyObject *module, path_t *path, const char *name,
14138 PyObject *DirEntryType = get_posix_state(module)->DirEntryType;
14260 PyObject *module = PyType_GetModule(Py_TYPE(iterator));
14261 entry = DirEntry_from_find_data(module, &iterator->path, file_data);
14332 PyObject *module = PyType_GetModule(Py_TYPE(iterator));
14333 entry = DirEntry_from_posix_info(module,
14456 os_scandir_impl(PyObject *module, path_t *path)
14474 PyObject *ScandirIteratorType = get_posix_state(module)->ScandirIteratorType;
14617 os_fspath_impl(PyObject *module, PyObject *path)
14634 os_getrandom_impl(PyObject *module, Py_ssize_t size, int flags)
14700 extension modules (the module itself is resolved through sys.path),
14708 os__add_dll_directory_impl(PyObject *module, path_t *path)
14753 os__remove_dll_directory_impl(PyObject *module, PyObject *cookie)
14825 os_waitstatus_to_exitcode_impl(PyObject *module, PyObject *status_obj)