~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Linux/arch/um/kernel/time_kern.c

Version: ~ [ 0.6-2.3.46 ] ~
Architecture: ~ [ um ] ~

** Warning: Cannot open xref database.

1 #include "linux/unistd.h" 2 #include "linux/stddef.h" 3 #include "linux/spinlock.h" 4 #include "linux/sched.h" 5 #include "asm/current.h" 6 #include "kern_util.h" 7 8 extern rwlock_t xtime_lock; 9 10 extern struct timeval xtime; 11 12 int ntimers = 0; 13 int blocked_timers = 0; 14 15 void timer_handler(int signal) 16 { 17 int is_user; 18 19 ntimers++; 20 block_signals(current); 21 is_user = set_user_thread(NULL, 0); 22 do_timer(NULL); 23 do_bh(); 24 write_lock(&xtime_lock); 25 gettimeofday(&xtime, NULL); 26 write_unlock(&xtime_lock); 27 unblock_signals(current); 28 if(is_user && current->need_resched) schedule(); 29 block_signals(current); 30 set_user_thread(NULL, is_user); 31 unblock_signals(current); 32 } 33 34 void block_signals(void *t) 35 { 36 struct task_struct *task; 37 38 if(t == NULL) task = current; 39 else task = t; 40 task->thread.block_sigs = 1; 41 } 42 43 void unblock_signals(void *t) 44 { 45 struct task_struct *task; 46 47 if(t == NULL) task = current; 48 else task = t; 49 task->thread.block_sigs = 0; 50 } 51 52 int sigs_blocked(void *task) 53 { 54 return(((struct task_struct *) task)->thread.block_sigs); 55 } 56 57 int set_signals(void *t, int block) 58 { 59 struct task_struct *task; 60 int ret; 61 62 task = t; 63 ret = task->thread.block_sigs; 64 task->thread.block_sigs = block; 65 return(ret); 66 } 67

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.