diff options
| author | Roland McGrath <roland@redhat.com> | 2005-03-07 18:17:13 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-03-07 18:17:13 -0800 |
| commit | c1dcd6c2d9b7478baf876725bd356f1b19eeaa65 (patch) | |
| tree | a5b213b90ca550635f96303c75826d0e8e086a86 /include | |
| parent | 857b64a59ebac8c9e1d951039cc9fb6a078f8274 (diff) | |
[PATCH] make ITIMER_REAL per-process
POSIX requires that setitimer, getitimer, and alarm work on a per-process
basis. Currently, Linux implements these for individual threads. This patch
fixes these semantics for the ITIMER_REAL timer (which generates SIGALRM),
making it shared by all threads in a process (thread group).
Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/init_task.h | 3 | ||||
| -rw-r--r-- | include/linux/sched.h | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index aa1eb2d45ed8..a6a8c1a38d5e 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h @@ -90,9 +90,6 @@ extern struct group_info init_groups; .children = LIST_HEAD_INIT(tsk.children), \ .sibling = LIST_HEAD_INIT(tsk.sibling), \ .group_leader = &tsk, \ - .real_timer = { \ - .function = it_real_fn \ - }, \ .group_info = &init_groups, \ .cap_effective = CAP_INIT_EFF_SET, \ .cap_inheritable = CAP_INIT_INH_SET, \ diff --git a/include/linux/sched.h b/include/linux/sched.h index 36a6174597f7..5fe77e2927af 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -301,6 +301,10 @@ struct signal_struct { /* POSIX.1b Interval Timers */ struct list_head posix_timers; + /* ITIMER_REAL timer for the process */ + struct timer_list real_timer; + unsigned long it_real_value, it_real_incr; + /* job control IDs */ pid_t pgrp; pid_t tty_old_pgrp; @@ -605,10 +609,8 @@ struct task_struct { int __user *clear_child_tid; /* CLONE_CHILD_CLEARTID */ unsigned long rt_priority; - unsigned long it_real_value, it_real_incr; cputime_t it_virt_value, it_virt_incr; cputime_t it_prof_value, it_prof_incr; - struct timer_list real_timer; cputime_t utime, stime; unsigned long nvcsw, nivcsw; /* context switch counts */ struct timespec start_time; |
