From 4e928b9211ab8a7df1d44aba898ce10dc5c452a3 Mon Sep 17 00:00:00 2001 From: kevinrs Date: Thu, 29 Sep 2005 22:25:14 +0000 Subject: [PATCH] Removed mask_string.stp, integrated into system_calls.stp --- tapset/mask_string.stp | 51 ------- tapset/system_calls.stp | 289 ++++++++++++++++++++++++++-------------- 2 files changed, 189 insertions(+), 151 deletions(-) delete mode 100644 tapset/mask_string.stp diff --git a/tapset/mask_string.stp b/tapset/mask_string.stp deleted file mode 100644 index db5eaef8e..000000000 --- a/tapset/mask_string.stp +++ /dev/null @@ -1,51 +0,0 @@ -/* - These functions construct the bitwise-or'd symbolic string - representation of the f param, based on the function arg. -*/ -function __decf(f,mask){ return ((f-mask)>=0) ? (f-mask) : f } - -/* `man 2 open` for more information */ -function _sys_open_flag_str(f) { - if((f-8192)>=0 && (f=__decf(f,8192))>=0) bs="O_ASYNC|".bs - if((f-4096)>=0 && (f=__decf(f,4096))>=0) bs="O_SYNC|".bs - if((f-2048)>=0 && (f=__decf(f,2048))>=0) bs="O_NONBLOCK|".bs - if((f-1024)>=0 && (f=__decf(f,1024))>=0) bs="O_APPEND|".bs - if((f-512)>=0 && (f=__decf(f,512))>=0) bs="O_TRUNC|".bs - if((f-256)>=0 && (f=__decf(f,256))>=0) bs="O_NDCTTY|".bs - if((f-128)>=0 && (f=__decf(f,128))>=0) bs="O_EXCL|".bs - if((f-64)>=0 && (f=__decf(f,64))>=0) bs="O_CREAT|".bs - if((f-2)>=0 && (f=__decf(f,2))>=0) - return substr("O_RDWR|".bs,0,strlen("O_RDWR|".bs)-1) - if((f-1)>=0 && (f=__decf(f,1))>=0) - return substr("O_WRONLY|".bs,0,strlen("O_WRONLY|".bs)-1) - return substr("O_RDONLY|".bs,0,strlen("O_RDONLY|".bs)-1) -} - -/* `man 2 open` for more information */ -function _sys_open_mode_str(f) { - if((f-448)>=0 && (f=__decf(f,448))>=0) bs="S_IRWXU|".bs - if((f-256)>=0 && (f=__decf(f,256))>=0) bs="S_IRUSR|".bs - if((f-128)>=0 && (f=__decf(f,128))>=0) bs="S_IWUSR|".bs - if((f-64)>=0 && (f=__decf(f,64))>=0) bs="S_IXUSR|".bs - if((f-56)>=0 && (f=__decf(f,56))>=0) bs="S_IRWXG|".bs - if((f-32)>=0 && (f=__decf(f,32))>=0) bs="S_IRGRP|".bs - if((f-16)>=0 && (f=__decf(f,16))>=0) bs="S_IWGRP|".bs - if((f-8)>=0 && (f=__decf(f,8))>=0) bs="S_IXGRP|".bs - if((f-7)>=0 && (f=__decf(f,7))>=0) bs="S_IRWXO|".bs - if((f-4)>=0 && (f=__decf(f,4))>=0) bs="S_IROTH|".bs - if((f-2)>=0 && (f=__decf(f,2))>=0) bs="S_IWOTH|".bs - if((f-1)>=0 && (f=__decf(f,1))>=0) bs="S_IXOTH|".bs - return substr(bs,0,strlen(bs)-1) - -/* `man adjtimex` for more information */ -function _sys_adjtimex_mode_str(f) { - if((f-32769)>=0 && (f=__decf(f,32769))>=0) bs="ADJ_OFFSET_SINGLESHOT|".bs - if((f-16384)>=0 && (f=__decf(f,16384))>=0) bs="ADJ_TICK|".bs - if((f-32)>=0 && (f=__decf(f,32))>=0) bs="ADJ_TIMECONST|".bs - if((f-16)>=0 && (f=__decf(f,16))>=0) bs="ADJ_STATUS|".bs - if((f-8)>=0 && (f=__decf(f,8))>=0) bs="ADJ_ESTERROR|".bs - if((f-3)>=0 && (f=__decf(f,3))>=0) bs="ADJ_MAXERROR|".bs - if((f-2)>=0 && (f=__decf(f,2))>=0) bs="ADJ_FREQUENCY|".bs - if((f-1)>=0 && (f=__decf(f,1))>=0) bs="ADJ_OFFSET|".bs - return substr(bs,0,strlen(bs)-1) -} diff --git a/tapset/system_calls.stp b/tapset/system_calls.stp index b0fc1ac5e..8be52d125 100644 --- a/tapset/system_calls.stp +++ b/tapset/system_calls.stp @@ -38,8 +38,9 @@ probe kernel.syscall.stime.return = */ } # gettimeofday_____________________________________ -/* asmlinkage long sys_gettimeofday(struct timeval __user *tv, - struct timezone __user *tz) */ +/* asmlinkage long + sys_gettimeofday(struct timeval __user *tv, + struct timezone __user *tz) */ probe kernel.syscall.gettimeofday = kernel.function("sys_gettimeofday") { name = "gettimeofday" @@ -56,8 +57,9 @@ probe kernel.syscall.gettimeofday.return = */ } # settimeofday_____________________________________ -/* asmlinkage long sys_settimeofday(struct timeval __user *tv, - struct timezone __user *tz) */ +/* asmlinkage long + sys_settimeofday(struct timeval __user *tv, + struct timezone __user *tz) */ probe kernel.syscall.settimeofday = kernel.function("sys_settimeofday") { name = "settimeofday" @@ -356,15 +358,18 @@ probe kernel.syscall.getgroups.return = SUMMARY int getgroups(int size, gid_t list[]); - Up to size supplementary group IDs are returned in list. - It is unspecified whether the effective group ID of the calling - process is included in the returned list. (Thus, an - application should also call getegid(2) and add or remove the - resulting value.) If size is zero, list is not modified, but the - total number of supplementary group IDs for the process is returned. - - Note: I do not think SystemTap has support for arrays, this may be - able to be delegated to an embedded aux function.... + Up to size supplementary group IDs are returned + in list. It is unspecified whether the effective + group ID of the calling process is included in + the returned list. (Thus, an application should + also call getegid(2) and add or remove the resulting + value.) If size is zero, list is not modified, but + the total number of supplementary group IDs for the + process is returned. + + Note: I do not think SystemTap has support for arrays, + this may be able to be delegated to an embedded + aux function.... */ } # setregid_________________________________________ @@ -522,8 +527,9 @@ probe kernel.syscall.setgroups = Sets the supplementary group IDs for the process. Only the super-user may use this function. - Note: I do not think SystemTap has support for arrays, this may be - able to be delegated to an embedded aux function.... + Note: I do not think SystemTap has support for arrays, + this may be able to be delegated to an embedded + aux function.... */ } @@ -537,8 +543,8 @@ probe kernel.syscall.setgroups.return = Sets the supplementary group IDs for the process. Only the super-user may use this function. - Note: I do not think SystemTap has support for arrays, this may be - able to be delegated to an embedded aux function.... + Note: I do not think SystemTap has support for arrays, this may be able to be delegated to an embedded + aux function.... */ } # acct_____________________________________________ @@ -678,17 +684,15 @@ probe kernel.syscall.sigpending.return = */ } # sigprocmask______________________________________ -/* asmlinkage long sys_sigprocmask(int how, - old_sigset_t __user *set, - old_sigset_t __user *oset) */ +/* asmlinkage long + sys_sigprocmask(int how, + old_sigset_t __user *set, + old_sigset_t __user *oset) */ probe kernel.syscall.sigprocmask = kernel.function("sys_sigprocmask") { name = "sigprocmask" how = $how - how_str = "" - if (how==0) how_str = "SIG_BLOCK" - if (how==1) how_str = "SIG_UNBLOCK" - if (how==2) how_str = "SIG_SETMASK" + how_str = _sigprocmask_how_str($how) /* set = $set oldset = $oset @@ -699,26 +703,21 @@ probe kernel.syscall.sigprocmask.return = kernel.function("sys_sigprocmask").return { name = "sigprocmask.return" how = $how - how_str = "" - if (how==0) how_str = "SIG_BLOCK" - if (how==1) how_str = "SIG_UNBLOCK" - if (how==2) how_str = "SIG_SETMASK" + how_str = _sigprocmask_how_str($how) /* set = $set oldset = $oset */ } # getitimer________________________________________ -/* asmlinkage long sys_getitimer(int which, - struct itimerval __user *value) */ +/* asmlinkage long + sys_getitimer(int which, + struct itimerval __user *value) */ probe kernel.syscall.getitimer = kernel.function("sys_getitimer") { name = "getitimer" which = $which - which_str = "" - if (how==0) how_str = "ITIMER_REAL" - if (how==1) how_str = "ITIMER_VIRTUAL" - if (how==2) how_str = "ITIMER_PROF" + which_str = _itimer_which_str($which) /* value_it_interval_tv_sec = $value->it_interval->tv_sec value_it_interval_tv_usec = $value->it_interval->tv_usec @@ -731,10 +730,7 @@ probe kernel.syscall.getitimer.return = kernel.function("sys_getitimer").return { name = "getitimer.return" which = $which - which_str = "" - if (how==0) how_str = "ITIMER_REAL" - if (how==1) how_str = "ITIMER_VIRTUAL" - if (how==2) how_str = "ITIMER_PROF" + which_str = _itimer_which_str($which) /* value_it_interval_tv_sec = $value->it_interval->tv_sec value_it_interval_tv_usec = $value->it_interval->tv_usec @@ -743,17 +739,15 @@ probe kernel.syscall.getitimer.return = */ } # setitimer________________________________________ -/* asmlinkage long sys_setitimer(int which, - struct itimerval __user *value, - struct itimerval __user *ovalue) */ +/* asmlinkage long + sys_setitimer(int which, + struct itimerval __user *value, + struct itimerval __user *ovalue) */ probe kernel.syscall.setitimer = kernel.function("sys_setitimer") { name = "setitimer" which = $which - which_str = "" - if (how==0) how_str = "ITIMER_REAL" - if (how==1) how_str = "ITIMER_VIRTUAL" - if (how==2) how_str = "ITIMER_PROF" + which_str = _itimer_which_str($which) /* value_it_interval_tv_sec = $value->it_interval->tv_sec value_it_interval_tv_usec = $value->it_interval->tv_usec @@ -766,10 +760,7 @@ probe kernel.syscall.setitimer.return = kernel.function("sys_setitimer").return { name = "setitimer.return" which = $which - which_str = "" - if (how==0) how_str = "ITIMER_REAL" - if (how==1) how_str = "ITIMER_VIRTUAL" - if (how==2) how_str = "ITIMER_PROF" + which_str = _itimer_which_str($which) /* value_it_interval_tv_sec = $value->it_interval->tv_sec value_it_interval_tv_usec = $value->it_interval->tv_usec @@ -783,9 +774,10 @@ probe kernel.syscall.setitimer.return = */ } # timer_create_____________________________________ -/* asmlinkage long sys_timer_create(clockid_t which_clock, - struct sigevent __user *timer_event_spec, - timer_t __user * created_timer_id) */ +/* asmlinkage long + sys_timer_create(clockid_t which_clock, + struct sigevent __user *timer_event_spec, + timer_t __user * created_timer_id) */ probe kernel.syscall.timer_create = kernel.function("sys_timer_create") { name = "timer_create" @@ -803,7 +795,8 @@ probe kernel.syscall.timer_create = struct { void (*_function)(sigval_t); - void *_attribute; // really pthread_attr_t + void *_attribute; + // really pthread_attr_t } _sigev_thread; } _sigev_un; } sigevent_t; @@ -828,7 +821,8 @@ probe kernel.syscall.timer_create.return = struct { void (*_function)(sigval_t); - void *_attribute; // really pthread_attr_t + void *_attribute; + // really pthread_attr_t } _sigev_thread; } _sigev_un; } sigevent_t; @@ -837,8 +831,9 @@ probe kernel.syscall.timer_create.return = */ } # timer_gettime____________________________________ -/* asmlinkage long sys_timer_gettime(timer_t timer_id, - struct itimerspec __user *setting) */ +/* asmlinkage long + sys_timer_gettime(timer_t timer_id, + struct itimerspec __user *setting) */ probe kernel.syscall.timer_gettime = kernel.function("sys_timer_gettime") { name = "timer_gettime" @@ -850,10 +845,14 @@ probe kernel.syscall.timer_gettime.return = name = "timer_gettime.return" timer_id = $timer_id /* - setting_it_interval_tv_sec = $setting->it_interval->tv_sec - setting_it_interval_tv_usec = $setting->it_interval->tv_usec - setting_it_value_tv_sec = $setting->it_value->tv_sec - setting_it_value_tv_usec = $setting->it_value->tv_usec + setting_it_interval_tv_sec = + $setting->it_interval->tv_sec + setting_it_interval_tv_usec = + $setting->it_interval->tv_usec + setting_it_value_tv_sec = + $setting->it_value->tv_sec + setting_it_value_tv_usec = + $setting->it_value->tv_usec */ } # timer_getoverrun_________________________________ @@ -870,17 +869,20 @@ probe kernel.syscall.timer_getoverrun.return = timer_id = $timer_id } # timer_settime____________________________________ -/* asmlinkage long sys_timer_settime(timer_t timer_id, int flags, - const struct itimerspec __user *new_setting, - struct itimerspec __user *old_setting) */ +/* asmlinkage long + sys_timer_settime(timer_t timer_id, int flags, + const struct itimerspec __user *new_setting, + struct itimerspec __user *old_setting) */ probe kernel.syscall.timer_settime = kernel.function("sys_timer_settime") { name = "timer_settime" timer_id = $timer_id flags = $flags /* - new_setting_it_interval_tv_sec = $new_setting->it_interval->tv_sec - new_setting_it_interval_tv_usec = $new_setting->it_interval->tv_usec + new_setting_it_interval_tv_sec = + $new_setting->it_interval->tv_sec + new_setting_it_interval_tv_usec = + $new_setting->it_interval->tv_usec */ } @@ -891,10 +893,14 @@ probe kernel.syscall.timer_settime.return = timer_id = $timer_id flags = $flags /* - new_setting_it_interval_tv_sec = $new_setting->it_interval->tv_sec - new_setting_it_interval_tv_usec = $new_setting->it_interval->tv_usec - old_setting_it_interval_tv_sec = $old_setting->it_interval->tv_sec - old_setting_it_interval_tv_usec = $old_setting->it_interval->tv_usec + new_setting_it_interval_tv_sec = + $new_setting->it_interval->tv_sec + new_setting_it_interval_tv_usec = + $new_setting->it_interval->tv_usec + old_setting_it_interval_tv_sec = + $old_setting->it_interval->tv_sec + old_setting_it_interval_tv_usec = + $old_setting->it_interval->tv_usec */ } # timer_delete_____________________________________ @@ -911,8 +917,9 @@ probe kernel.syscall.timer_delete.return = timer_id = $timer_id } # clock_settime____________________________________ -/* asmlinkage long sys_clock_settime(clockid_t which_clock, - const struct timespec __user *tp) */ +/* asmlinkage long + sys_clock_settime(clockid_t which_clock, + const struct timespec __user *tp) */ probe kernel.syscall.clock_settime = kernel.function("sys_clock_settime") { name = "clock_settime" @@ -935,8 +942,9 @@ probe kernel.syscall.clock_settime.return = */ } # clock_gettime____________________________________ -/* asmlinkage long sys_clock_gettime(clockid_t which_clock, - struct timespec __user *tp) */ +/* asmlinkage long + sys_clock_gettime(clockid_t which_clock, + struct timespec __user *tp) */ probe kernel.syscall.clock_gettime = kernel.function("sys_clock_gettime") { name = "clock_gettime" @@ -955,8 +963,9 @@ probe kernel.syscall.clock_gettime.return = */ } # clock_getres_____________________________________ -/* asmlinkage long sys_clock_getres(clockid_t which_clock, - struct timespec __user *tp) */ +/* asmlinkage long + sys_clock_getres(clockid_t which_clock, + struct timespec __user *tp) */ probe kernel.syscall.clock_getres = kernel.function("sys_clock_getres") { name = "clock_getres" @@ -975,9 +984,11 @@ probe kernel.syscall.clock_getres.return = */ } # clock_nanosleep__________________________________ -/* asmlinkage long sys_clock_nanosleep(clockid_t which_clock, int flags, - const struct timespec __user *rqtp, - struct timespec __user *rmtp) */ +/* asmlinkage long + sys_clock_nanosleep(clockid_t which_clock, + int flags, + const struct timespec __user *rqtp, + struct timespec __user *rmtp) */ probe kernel.syscall.clock_nanosleep = kernel.function("sys_clock_nanosleep") { name = "clock_nanosleep" @@ -1019,17 +1030,15 @@ probe kernel.syscall.nice.return = inc = $increment } # sched_setscheduler_______________________________ -/* asmlinkage long sys_sched_setscheduler(pid_t pid, int policy, - struct sched_param __user *param) */ +/* asmlinkage long + sys_sched_setscheduler(pid_t pid, int policy, + struct sched_param __user *param) */ probe kernel.syscall.sched_setscheduler = kernel.function("do_sched_setscheduler") { name = "sched_setscheduler" pid = $pid policy = $policy - policy_str = "" - if($policy==0) policy_str = "SCHED_OTHER" - if($policy==1) policy_str = "SCHED_FIFO" - if($policy==2) policy_str = "SCHED_RR" + policy_str = _sched_policy_str($policy) /* p_sched_priority = param->sched_parameter */ @@ -1040,17 +1049,15 @@ probe kernel.syscall.sched_setscheduler.return = name = "sched_setscheduler.return" pid = $pid policy = $policy - policy_str = "" - if($policy==0) policy_str = "SCHED_OTHER" - if($policy==1) policy_str = "SCHED_FIFO" - if($policy==2) policy_str = "SCHED_RR" + policy_str = _sched_policy_str($policy) /* p_sched_priority = param->sched_parameter */ } # sched_setparam___________________________________ -/* asmlinkage long sys_sched_setparam(pid_t pid, - struct sched_param __user *param) */ +/* asmlinkage long + sys_sched_setparam(pid_t pid, + struct sched_param __user *param) */ probe kernel.syscall.sched_setparam = kernel.function("do_sched_setscheduler") { name = "sched_setparam" @@ -1082,8 +1089,9 @@ probe kernel.syscall.sched_getscheduler.return = pid = $pid } # sched_getparam___________________________________ -/* asmlinkage long sys_sched_getparam(pid_t pid, - struct sched_param __user *param) */ +/* asmlinkage long + sys_sched_getparam(pid_t pid, + struct sched_param __user *param) */ probe kernel.syscall.sched_getparam = kernel.function("sys_sched_getparam") { name = "sched_getparam" @@ -1114,8 +1122,9 @@ probe kernel.syscall.sched_setaffinity.return = mask = $new_mask } # sched_getaffinity________________________________ -/* asmlinkage long sys_sched_getaffinity(pid_t pid, unsigned int len, - unsigned long __user *user_mask_ptr) */ +/* asmlinkage long + sys_sched_getaffinity(pid_t pid, unsigned int len, + unsigned long __user *user_mask_ptr) */ probe kernel.syscall.sched_getaffinity = kernel.function("sys_sched_getaffinity") { name = "sched_getaffinity" @@ -1170,8 +1179,9 @@ probe kernel.syscall.sched_get_priority_min.return = policy = $policy } # sched_rr_get_interval____________________________ -/* asmlinkage long sys_sched_rr_get_interval(pid_t pid, - struct timespec __user *interval) */ +/* asmlinkage long + sys_sched_rr_get_interval(pid_t pid, + struct timespec __user *interval) */ probe kernel.syscall.sched_rr_get_interval = kernel.function("sys_sched_rr_get_interval") { name = "sched_rr_get_interval" @@ -3397,13 +3407,92 @@ probe kernel.syscall.rt_sigaction.return = kernel.function("sys_rt_sigaction").return { name = "rt_sigaction.return" } -/* AUX_HELPER FUNCTIONS AUX_HELPER FUNCTIONS AUX_HELPER FUNCTIONS */ -_get_wc_str(wc) { - if (wc==0) return "CLOCK_REALTIME" + + +/* AUX HELPER FUNCTIONS AUX HELPER FUNCTIONS AUX HELPER FUNCTIONS */ + +/* + These functions construct the bitwise-or'd symbolic string + representation of the f param, based on the function arg. +*/ + +function __decf(f,mask){ return ((f-mask)>=0) ? (f-mask) : f } + +/* `man 2 open` for more information */ +function _sys_open_flag_str(f) { + if((f-8192)>=0 && (f=__decf(f,8192))>=0) bs="O_ASYNC|".bs + if((f-4096)>=0 && (f=__decf(f,4096))>=0) bs="O_SYNC|".bs + if((f-2048)>=0 && (f=__decf(f,2048))>=0) bs="O_NONBLOCK|".bs + if((f-1024)>=0 && (f=__decf(f,1024))>=0) bs="O_APPEND|".bs + if((f-512)>=0 && (f=__decf(f,512))>=0) bs="O_TRUNC|".bs + if((f-256)>=0 && (f=__decf(f,256))>=0) bs="O_NDCTTY|".bs + if((f-128)>=0 && (f=__decf(f,128))>=0) bs="O_EXCL|".bs + if((f-64)>=0 && (f=__decf(f,64))>=0) bs="O_CREAT|".bs + if((f-2)>=0 && (f=__decf(f,2))>=0) + return substr("O_RDWR|".bs,0,strlen("O_RDWR|".bs)-1) + if((f-1)>=0 && (f=__decf(f,1))>=0) + return substr("O_WRONLY|".bs,0,strlen("O_WRONLY|".bs)-1) + return substr("O_RDONLY|".bs,0,strlen("O_RDONLY|".bs)-1) +} + +/* `man 2 open` for more information */ +function _sys_open_mode_str(f) { + if((f-448)>=0 && (f=__decf(f,448))>=0) bs="S_IRWXU|".bs + if((f-256)>=0 && (f=__decf(f,256))>=0) bs="S_IRUSR|".bs + if((f-128)>=0 && (f=__decf(f,128))>=0) bs="S_IWUSR|".bs + if((f-64)>=0 && (f=__decf(f,64))>=0) bs="S_IXUSR|".bs + if((f-56)>=0 && (f=__decf(f,56))>=0) bs="S_IRWXG|".bs + if((f-32)>=0 && (f=__decf(f,32))>=0) bs="S_IRGRP|".bs + if((f-16)>=0 && (f=__decf(f,16))>=0) bs="S_IWGRP|".bs + if((f-8)>=0 && (f=__decf(f,8))>=0) bs="S_IXGRP|".bs + if((f-7)>=0 && (f=__decf(f,7))>=0) bs="S_IRWXO|".bs + if((f-4)>=0 && (f=__decf(f,4))>=0) bs="S_IROTH|".bs + if((f-2)>=0 && (f=__decf(f,2))>=0) bs="S_IWOTH|".bs + if((f-1)>=0 && (f=__decf(f,1))>=0) bs="S_IXOTH|".bs + return substr(bs,0,strlen(bs)-1) +} +/* `man adjtimex` for more information */ +function _sys_adjtimex_mode_str(f) { + if((f-32769)>=0 && (f=__decf(f,32769))>=0) bs="ADJ_OFFSET_SINGLESHOT|".bs + if((f-16384)>=0 && (f=__decf(f,16384))>=0) bs="ADJ_TICK|".bs + if((f-32)>=0 && (f=__decf(f,32))>=0) bs="ADJ_TIMECONST|".bs + if((f-16)>=0 && (f=__decf(f,16))>=0) bs="ADJ_STATUS|".bs + if((f-8)>=0 && (f=__decf(f,8))>=0) bs="ADJ_ESTERROR|".bs + if((f-3)>=0 && (f=__decf(f,3))>=0) bs="ADJ_MAXERROR|".bs + if((f-2)>=0 && (f=__decf(f,2))>=0) bs="ADJ_FREQUENCY|".bs + if((f-1)>=0 && (f=__decf(f,1))>=0) bs="ADJ_OFFSET|".bs + return substr(bs,0,strlen(bs)-1) +} + +function _get_wc_str(wc) { + if (wc==0) return "CLOCK_REALTIME" if (wc==1) return "CLOCK_MONOTONIC" if (wc==2) return "CLOCK_PROCESS_CPUTIME_ID" if (wc==3) return "CLOCK_THREAD_CPUTIME_ID" if (wc==4) return "CLOCK_REALTIME_HR" if (wc==5) return "CLOCK_MONOTONIC_HR" - return "" + return "" +} + +function _sigprocmask_how_str(how) { + if (how==0) return "SIG_BLOCK" + if (how==1) return "SIG_UNBLOCK" + if (how==2) return "SIG_SETMASK" + return "" +} + +function _itimer_which_str(which) { + if (which==0) return "ITIMER_REAL" + if (which==1) return "ITIMER_VIRTUAL" + if (which==2) return "ITIMER_PROF" + return "" } + +function _sched_policy_str(policy) { + if (policy==0) return "SCHED_OTHER" + if (policy==1) return "SCHED_FIFO" + if (policy==2) return "SCHED_RR" + return "" +} + + -- 2.43.5