Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116364
b: refs/heads/master
c: 5a51b71
h: refs/heads/master
v: v3
  • Loading branch information
Oleg Nesterov authored and Thomas Gleixner committed Sep 24, 2008
1 parent 0d7a377 commit f8101da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5a9fa73072854981a5c05eb7ba18a96d49c2804f
refs/heads/master: 5a51b713ccf8835d5adf7217e2f86eb12b1ca851
9 changes: 4 additions & 5 deletions trunk/kernel/posix-timers.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,7 @@ sys_timer_create(const clockid_t which_clock,
goto out;
}
spin_lock_irq(&idr_lock);
error = idr_get_new(&posix_timers_id, (void *) new_timer,
&new_timer_id);
error = idr_get_new(&posix_timers_id, new_timer, &new_timer_id);
spin_unlock_irq(&idr_lock);
if (error) {
if (error == -EAGAIN)
Expand Down Expand Up @@ -567,12 +566,12 @@ static struct k_itimer * lock_timer(timer_t timer_id, unsigned long *flags)
*/

spin_lock_irqsave(&idr_lock, *flags);
timr = (struct k_itimer *) idr_find(&posix_timers_id, (int) timer_id);
timr = idr_find(&posix_timers_id, (int) timer_id);
if (timr) {
spin_lock(&timr->it_lock);

if ((timr->it_id != timer_id) || !(timr->it_process) ||
!same_thread_group(timr->it_process, current)) {
if (!timr->it_process ||
!same_thread_group(timr->it_process, current)) {
spin_unlock(&timr->it_lock);
spin_unlock_irqrestore(&idr_lock, *flags);
timr = NULL;
Expand Down

0 comments on commit f8101da

Please sign in to comment.