]> git.hungrycats.org Git - linux/commitdiff
Reserve the sys_prctl() numbers for and add the stub for allowing
authorDoug Ledford <dledford@compaq.xsintricity.com>
Sun, 17 Aug 2003 09:29:33 +0000 (05:29 -0400)
committerDoug Ledford <dledford@compaq.xsintricity.com>
Sun, 17 Aug 2003 09:29:33 +0000 (05:29 -0400)
programs to select whether they use statistical time accounting
or accurate timestamp based accounting.

include/linux/prctl.h
kernel/sys.c

index 2cc14f5e53961c486ca08b3614b5e362800334ea..f9bfac9529889a00dd1b4fdf549e350ca09efd1b 100644 (file)
 # define PR_FP_EXC_ASYNC       2       /* async recoverable exception mode */
 # define PR_FP_EXC_PRECISE     3       /* precise exception mode */
 
+/* Get/set whether we use statistical process timing or accurate timestamp
+ * based process timing */
+#define PR_GET_TIMING   13
+#define PR_SET_TIMING   14
+# define PR_TIMING_STATISTICAL  0       /* Normal, traditional,
+                                                   statistical process timing */
+# define PR_TIMING_TIMESTAMP    1       /* Accurate timestamp based
+                                                   process timing */
+
+
 #endif /* _LINUX_PRCTL_H */
index 0bd0c5a399a6fee60ae5f4ff1488ebb497d7e9c6..3497a1565a618c93a40ce682659a25c1a1043bff 100644 (file)
@@ -1399,7 +1399,15 @@ asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3,
                case PR_GET_FPEXC:
                        error = GET_FPEXC_CTL(current, arg2);
                        break;
-
+               case PR_GET_TIMING:
+                       error = PR_TIMING_STATISTICAL;
+                       break;
+               case PR_SET_TIMING:
+                       if (arg2 == PR_TIMING_STATISTICAL)
+                               error = 0;
+                       else
+                               error = -EINVAL;
+                       break;
 
                case PR_GET_KEEPCAPS:
                        if (current->keep_capabilities)