#include "mpw.h"#include <stdlib.h>#include <sys/time.h>#include <sys/resource.h>#include <Types.h>#include <Files.h>#include <Timer.h>#include "utime.h"

Go to the source code of this file.
Defines | |
| #define | ZEROBLKSIZE 4096 |
| #define | LOCKBIT (1<<0) |
| #define | DIRBIT (1<<4) |
Functions/Subroutines | |
| void | mpwify_filename (char *unixname, char *macname) |
| char * | mpw_basename (char *name) |
| char * | mpw_mixed_basename (char *name) |
| FILE * | mpw_fopen (char *name, char *mode) |
| int | mpw_fseek (FILE *fp, int offset, int whence) |
| int | mpw_fread (char *ptr, int size, int nitems, FILE *stream) |
| int | mpw_fwrite (char *ptr, int size, int nitems, FILE *stream) |
| int | link () |
| int | fork () |
| int | vfork () |
| int | pipe (int *fd) |
| int | execvp (char *file, char **argv) |
| int | execv (char *path, char **argv) |
| int | kill (int pid, int sig) |
| int | wait (int *status) |
| int | sleep (int seconds) |
| void | putenv (char *str) |
| int | chmod (char *path, int mode) |
| int | getuid () |
| int | getgid () |
| void | mpw_abort () |
| int | getrusage (int who, struct rusage *rusage) |
| int | sbrk () |
| int | isatty (int fd) |
| int | utime (char *filename, struct utimbuf *times) |
| int | mkdir (char *path, int mode) |
| int | rmdir () |
| chown () | |
| static int | _stat (char *name, long dirid, struct stat *buf) |
| int | stat (char *path, struct stat *buf) |
| int | fstat (int fd, struct stat *buf) |
| chdir () | |
| char * | getcwd (char *buf, int size) |
| char * | getpwd () |
| int | mpw_open (char *filename, int arg2, int arg3) |
| int | mpw_access (char *filename, unsigned int cmd) |
| int | mpw_creat (char *path, int mode) |
| mpw_special_init (char *name) | |
| int | umask (int mask) |
| void | warn_if_spin_delay (char *file, int line) |
| void | record_for_spin_delay (char *file, int line) |
| void | mpw_start_progress (char *str, int n, char *file, int line) |
| void | mpw_progress (int n) |
| void | mpw_progress_measured (int n, char *file, int line) |
| void | mpw_end_progress (char *str, char *file, int line) |
Variables | |
| int | sys_nerr = 0 |
| int | DebugPI = -1 |
| char | zeros [ZEROBLKSIZE] |
| char * | myenviron [] = {NULL} |
| char ** | environ = myenviron |
| int | __uid = 0 |
| int | __gid = 0 |
| static int | current_umask |
| int | cursor_inited |
| int | measure_spin |
| int | dump_spin_data |
| long | warning_threshold = 400000 |
| long | bucket_size = 1024 |
| long | bucket_power = 10 |
| long | numbuckets = 300 |
| int * | delay_counts |
| int | overflow_count |
| char * | current_progress |
| static UnsignedWide | last_microseconds |
| static char * | last_spin_file = "" |
| static int | last_spin_line |
| #define ZEROBLKSIZE 4096 |
Definition at line 516 of file mpw.c.
References __gid, __uid, DIRBIT, ENOENT, err, errno, LOCKBIT, pname, S_IFDIR, S_IFREG, short, stat::st_atime, stat::st_ctime, stat::st_dev, stat::st_gid, stat::st_ino, stat::st_mode, stat::st_mtime, stat::st_rsize, stat::st_size, stat::st_uid, and strcpy.
| chdir | ( | ) |
Definition at line 645 of file mpw.c.
Referenced by _PXFCHDIR(), chdir_(), main(), and recompile_files().
| int chmod | ( | char * | path, | |
| int | mode | |||
| ) |
Definition at line 363 of file mpw.c.
Referenced by _PXFCHMOD(), bfd_close(), bfd_close_all_done(), edit_file(), ipa_compile_init(), and ipacom_doit().
| chown | ( | ) |
| int execv | ( | char * | path, | |
| char ** | argv | |||
| ) |
Definition at line 314 of file mpw.c.
References fprintf(), and mpw_abort().
Referenced by _PXFEXECV(), main(), my_execv(), pex_unix_exec_child(), pexecute(), and scan_prog_file().
| int execvp | ( | char * | file, | |
| char ** | argv | |||
| ) |
Definition at line 306 of file mpw.c.
References fprintf(), and mpw_abort().
Referenced by _PXFEXECVP(), chain_open(), exec_smake(), Execute(), pex_unix_exec_child(), pexecute(), and process_command().
| char* getcwd | ( | char * | buf, | |
| int | size | |||
| ) |
Definition at line 408 of file mpw.c.
Referenced by clock(), dtime_(), execute(), get_cpu(), Get_Resources(), get_run_time(), get_time(), main(), and pex_wait().
| int link | ( | ) |
Definition at line 275 of file mpw.c.
References fprintf(), and mpw_abort().
Referenced by _PXFLINK(), G77_link_0(), and run_prof().
| int mkdir | ( | char * | path, | |
| int | mode | |||
| ) |
Definition at line 471 of file mpw.c.
Referenced by create_file(), make_class_file_name(), save_cpp_output(), and update_rii_file().
| int mpw_access | ( | char * | filename, | |
| unsigned int | cmd | |||
| ) |
| void mpw_end_progress | ( | char * | str, | |
| char * | file, | |||
| int | line | |||
| ) |
Definition at line 891 of file mpw.c.
References bucket_size, count, delay(), delay_counts, dump_spin_data, fprintf(), i, measure_spin, NULL, numbuckets, and warn_if_spin_delay().
| FILE* mpw_fopen | ( | char * | name, | |
| char * | mode | |||
| ) |
| int mpw_fread | ( | char * | ptr, | |
| int | size, | |||
| int | nitems, | |||
| FILE * | stream | |||
| ) |
| int mpw_fseek | ( | FILE * | fp, | |
| int | offset, | |||
| int | whence | |||
| ) |
| int mpw_fwrite | ( | char * | ptr, | |
| int | size, | |||
| int | nitems, | |||
| FILE * | stream | |||
| ) |
| int mpw_open | ( | char * | filename, | |
| int | arg2, | |||
| int | arg3 | |||
| ) |
| void mpw_progress_measured | ( | int | n, | |
| char * | file, | |||
| int | line | |||
| ) |
Definition at line 881 of file mpw.c.
References measure_spin, record_for_spin_delay(), and warn_if_spin_delay().
| mpw_special_init | ( | char * | name | ) |
| void mpw_start_progress | ( | char * | str, | |
| int | n, | |||
| char * | file, | |||
| int | line | |||
| ) |
Definition at line 838 of file mpw.c.
References atol(), current_progress, cursor_inited, delay_counts, dump_spin_data, errno_max(), getenv(), i, malloc, measure_spin, mpw_special_init(), NULL, numbuckets, overflow_count, record_for_spin_delay(), strcmp(), sys_nerr, and warning_threshold.
| void mpwify_filename | ( | char * | unixname, | |
| char * | macname | |||
| ) |
Definition at line 45 of file mpw.c.
References DebugPI, fprintf(), getenv(), i, strchr, strlen(), and strncmp().
Referenced by mpw_access(), mpw_fopen(), mpw_open(), pexecute(), and stat().
| int pipe | ( | int * | fd | ) |
Definition at line 297 of file mpw.c.
Referenced by alphaev4_next_group(), alphaev5_next_group(), chain_open(), DAVINCI::DAVINCI(), daVinci::daVinci(), DaVinci::DaVinci(), internal_fix(), pex_unix_pipe(), pexecute(), proc2_open(), process_command(), pxfpipe_(), and scan_prog_file().
| void record_for_spin_delay | ( | char * | file, | |
| int | line | |||
| ) |
Definition at line 830 of file mpw.c.
References last_microseconds, last_spin_file, and last_spin_line.
Referenced by mpw_progress_measured(), and mpw_start_progress().
| int rmdir | ( | ) |
| int sbrk | ( | ) |
Definition at line 421 of file mpw.c.
Referenced by Get_Resources(), GRA_Init_Trace_Memory(), GRA_Trace_Memory(), init_compiler(), main(), monstartup(), Set_opt_phase(), xmalloc_failed(), and xmalloc_set_program_name().
| int sleep | ( | int | seconds | ) |
Definition at line 339 of file mpw.c.
References PROGRESS, start_time, and time.
Referenced by _PXFSLEEP(), internal_fix(), pex_unix_exec_child(), pexecute(), sleep_(), and start_fixer().
| int umask | ( | int | mask | ) |
Definition at line 757 of file mpw.c.
Referenced by _PXFUMASK(), bfd_close(), bfd_close_all_done(), create_tmpdir(), and G77_umask_0().
| void warn_if_spin_delay | ( | char * | file, | |
| int | line | |||
| ) |
Definition at line 800 of file mpw.c.
References bucket_power, current_progress, delay_counts, dump_spin_data, fprintf(), last_microseconds, last_spin_file, last_spin_line, NULL, numbuckets, overflow_count, and warning_threshold.
Referenced by mpw_end_progress(), and mpw_progress_measured().
| long bucket_power = 10 |
| long bucket_size = 1024 |
| char* current_progress |
int current_umask [static] |
| int cursor_inited |
| int DebugPI = -1 |
Definition at line 42 of file mpw.c.
Referenced by fstat(), mpw_access(), mpw_open(), mpwify_filename(), and stat().
| int* delay_counts |
Definition at line 787 of file mpw.c.
Referenced by mpw_end_progress(), mpw_start_progress(), and warn_if_spin_delay().
| int dump_spin_data |
Definition at line 777 of file mpw.c.
Referenced by mpw_end_progress(), mpw_start_progress(), and warn_if_spin_delay().
UnsignedWide last_microseconds [static] |
Definition at line 793 of file mpw.c.
Referenced by record_for_spin_delay(), and warn_if_spin_delay().
char* last_spin_file = "" [static] |
Definition at line 795 of file mpw.c.
Referenced by record_for_spin_delay(), and warn_if_spin_delay().
int last_spin_line [static] |
Definition at line 797 of file mpw.c.
Referenced by record_for_spin_delay(), and warn_if_spin_delay().
| int measure_spin |
Definition at line 773 of file mpw.c.
Referenced by mpw_end_progress(), mpw_progress_measured(), and mpw_start_progress().
| long numbuckets = 300 |
Definition at line 785 of file mpw.c.
Referenced by mpw_end_progress(), mpw_start_progress(), and warn_if_spin_delay().
| int overflow_count |
| long warning_threshold = 400000 |
| char zeros[ZEROBLKSIZE] |
Definition at line 219 of file mpw.c.
Referenced by AR_ibits(), AR_ishft(), AR_ishftc(), AR_mask(), build_automata(), mostly_zeros_p(), mpw_fseek(), or32_opcode_match(), and VECTOR_SPACE< T >::VECTOR_SPACE().
1.5.6