Changeset 21
- Timestamp:
- 11/13/05 00:24:09 (6 years ago)
- Files:
-
- arch/i386/kernel/callgate.c (modified) (6 diffs)
- arch/i386/kernel/entry.S (modified) (2 diffs)
- arch/i386/kernel/irq.c (modified) (2 diffs)
- arch/i386/kernel/traps.c (modified) (2 diffs)
- Documentation/DAPI.txt (modified) (2 diffs)
- drivers/char/misc.c (modified) (1 diff)
- fs/file_table.c (modified) (3 diffs)
- fs/ioctl.c (modified) (1 diff)
- fs/proc/generic.c (modified) (1 diff)
- fs/read_write.c (modified) (3 diffs)
- include/asm-i386/callgate.h (modified) (1 diff)
- include/asm-i386/dapi.h (modified) (14 diffs)
- include/linux/module.h (modified) (1 diff)
- include/linux/poll.h (modified) (1 diff)
- include/linux/sched.h (modified) (1 diff)
- include/linux/wait.h (modified) (2 diffs)
- kernel/exit.c (modified) (1 diff)
- kernel/fork.c (modified) (2 diffs)
- kernel/module.c (modified) (3 diffs)
- kernel/printk.c (modified) (1 diff)
- kernel/sched.c (modified) (2 diffs)
- kernel/timer.c (modified) (1 diff)
- .version (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
arch/i386/kernel/callgate.c
r20 r21 102 102 struct task_struct *mod_get_current(void) { 103 103 struct task_struct *tsk=current; 104 if (tsk->currentmapped) 104 if (tsk->currentmapped) { 105 105 return tsk->currentaddr; 106 tsk->currentaddr=(struct task_struct*) map_struct(tsk, sizeof(*tsk), tsk->ring, &tsk->origcurrentaddr); 106 } 107 tsk->currentaddr=(struct task_struct*) map_struct(tsk, sizeof(*tsk)+PAGE_SIZE, tsk->ring, &tsk->origcurrentaddr); 107 108 tsk->currentmapped=1; 108 109 return tsk->currentaddr; … … 116 117 "pushl 16(%ebp)\n\t" 117 118 "decl %ecx\n\t" 118 "cmpl $ 7, %ecx\n\t"119 "cmpl $8, %ecx\n\t" 119 120 "ja done2\n\t" 120 121 "call *callgate_table2(,%ecx,4)\n\t" … … 123 124 "leave\n\t" 124 125 "lret $8\n\t" 125 "callgate_table2: .long driver_printdiag, do_exit, driver_exit, misc_register, misc_deregister, unregister_sysctl_table, del_timer "126 "callgate_table2: .long driver_printdiag, do_exit, driver_exit, misc_register, misc_deregister, unregister_sysctl_table, del_timer, mod_signal_pending" 126 127 ); 127 128 … … 348 349 return tsk->exit_code;*/ 349 350 350 tsk=find_worker_thread(addr );351 tsk=find_worker_thread(addr, ptrbitmap & USE_RESERVED); 351 352 if (!tsk) { 352 353 printk(KERN_ERR "Could not find worker thread for address %x\n", addr); … … 420 421 if (addrs[i]) { 421 422 ClearPageReserved(pfn_to_page(__pa(argv[i]) >> PAGE_SHIFT)); 423 ClearPageReserved(pfn_to_page((__pa(argv[i]) >> PAGE_SHIFT) + 1)); 422 424 vunmap(origmems[i]); 423 425 } … … 452 454 vma->vm_mm=&init_mm; 453 455 SetPageReserved(pfn_to_page(__pa(kernel_struct) >> PAGE_SHIFT)); 456 457 SetPageReserved(pfn_to_page((__pa(kernel_struct) >> PAGE_SHIFT) + 1)); 454 458 remap_page_range(vma, addr, __pa(kernel_struct), size, PAGE_KERNEL); 455 459 addr+=(unsigned long) kernel_struct & (PAGE_SIZE -1); arch/i386/kernel/entry.S
r8 r21 302 302 testb $_TIF_NEED_RESCHED, %cl 303 303 jz work_notifysig 304 #NEW FOR RING CYCLE 305 testb $1, CS(%esp) 306 jz work_notifysig 307 testb $2, CS(%esp) 308 jz work_notifysig 304 309 work_resched: 305 310 call user_schedule … … 912 917 .long sys_mq_getsetattr 913 918 .long sys_ni_syscall /* reserved for kexec */ 914 .long sys_printdiag 915 .long driver_exit /* 285*/ 919 .long sys_printdiag 920 .long driver_exit /* 285*/ 921 .long mod_schedule 916 922 917 923 syscall_table_size=(.-sys_call_table) arch/i386/kernel/irq.c
r1 r21 47 47 #include <asm/desc.h> 48 48 #include <asm/irq.h> 49 49 #include <asm/callgate.h> 50 50 /* 51 51 * Linux has a controller-independent x86 interrupt architecture. … … 230 230 do { 231 231 status |= action->flags; 232 retval |= action->handler(irq, action->dev_id, regs); 233 action = action->next; 232 if ((unsigned long) action->handler > PAGE_OFFSET) 233 retval |= action->handler(irq, action->dev_id, regs); 234 else { 235 unsigned long args[3]={irq, (unsigned long) action->dev_id, (unsigned long) regs}; 236 calldriver((unsigned long) action->handler, args, 3, current->mm, NO_WAIT | 0); 237 retval|=IRQ_HANDLED; 238 } 239 240 action = action->next; 234 241 } while (action); 235 242 if (status & SA_SAMPLE_RANDOM) arch/i386/kernel/traps.c
r18 r21 58 58 #include "mach_traps.h" 59 59 60 //Enable to treat driver gp faults like kernel ones 61 #define DEBUG_DRIVER 62 63 60 64 asmlinkage int system_call(void); 61 65 asmlinkage void lcall7(void); … … 461 465 //driver thread 462 466 printk("General protection fault in driver thread at %x\n", regs->eip); 467 #ifdef DEBUG_DRIVER 468 goto gp_in_kernel; 469 #endif 463 470 //die("general protection", regs, error_code); 464 471 current->thread.error_code=error_code; Documentation/DAPI.txt
r19 r21 72 72 to add 1 to the parameter count when deciding which jump table to add to. 73 73 74 include/asm/ callgate.h: Add a preprocessor macro CALLGATE_func where func is74 include/asm/dapi.h: Add a preprocessor macro CALLGATE_func where func is 75 75 the name of the functino you are implementing. The value of the macro should 76 76 be a pushl instruction which pushes the number of the function (the location … … 121 121 callgate_table2: .long x,y callgate_table2: .long x, y, misc_register 122 122 123 In include/asm/ callgate.h: Add the following line123 In include/asm/dapi.h: Add the following line 124 124 #define CALLGATE_misc_register "pushl $3\n\t" since here misc_register is the 125 125 third function in the jump table. drivers/char/misc.c
r14 r21 52 52 #include <linux/kmod.h> 53 53 54 #include <asm/callgate.h> 54 55 /* 55 56 * Head entry for the doubly linked miscdevice list fs/file_table.c
r1 r21 18 18 #include <linux/cdev.h> 19 19 20 #include <asm/callgate.h> 20 21 /* sysctl tunables... */ 21 22 struct files_stat_struct files_stat = { … … 146 147 struct inode * inode = file->f_dentry->d_inode; 147 148 148 if (file->f_op && file->f_op->release) 149 file->f_op->release(inode, file); 149 if (file->f_op && file->f_op->release) { 150 if ((unsigned long) file->f_op->release > PAGE_OFFSET) 151 file->f_op->release(inode, file); 152 else { 153 unsigned long args[2]={(unsigned long) inode, (unsigned long) file}; 154 calldriver((unsigned long) file->f_op->release, args, 2, current->mm, 3); 155 } 156 } 150 157 security_file_free(file); 151 158 } … … 177 184 locks_remove_flock(file); 178 185 179 if (file->f_op && file->f_op->release) 180 file->f_op->release(inode, file); 186 if (file->f_op && file->f_op->release) { 187 if ((unsigned long) file->f_op->release > PAGE_OFFSET) 188 file->f_op->release(inode, file); 189 else { 190 unsigned long args[2]={(unsigned long) inode, (unsigned long) file}; 191 calldriver((unsigned long) file->f_op->release, args, 2, current->mm, 3); 192 } 193 } 181 194 security_file_free(file); 182 195 if (unlikely(inode->i_cdev != NULL)) fs/ioctl.c
r18 r21 13 13 #include <asm/uaccess.h> 14 14 #include <asm/ioctls.h> 15 #include <asm/callgate.h> 15 16 16 17 static int file_ioctl(struct file *filp,unsigned int cmd,unsigned long arg) fs/proc/generic.c
r20 r21 21 21 #include <asm/bitops.h> 22 22 23 #include <asm/callgate.h> 23 24 static ssize_t proc_file_read(struct file *file, char __user *buf, 24 25 size_t nbytes, loff_t *ppos); fs/read_write.c
r13 r21 17 17 #include <asm/uaccess.h> 18 18 #include <asm/unistd.h> 19 #include <asm/callgate.h> 19 20 20 21 struct file_operations generic_ro_fops = { … … 231 232 args[2]=(unsigned long) count; 232 233 args[3]=(unsigned long) pos; 233 ret = calldriver((unsigned long) file->f_op->read, args, 4, current->mm, 0);234 ret = calldriver((unsigned long) file->f_op->read, args, 4, current->mm, 9); 234 235 } 235 236 } … … 296 297 args[2]=(unsigned long) count; 297 298 args[3]=(unsigned long) pos; 298 ret = calldriver((unsigned long) file->f_op->write, args, 4, current->mm, 0);299 ret = calldriver((unsigned long) file->f_op->write, args, 4, current->mm, 9); 299 300 } 300 301 } include/asm-i386/callgate.h
r20 r21 28 28 //FLAGS for calldriver 29 29 #define NO_WAIT 0x80000000 30 31 /* So here's what going on: 32 * we have a jump table for drivers calling into the kernel 33 * there is a seperate entry point based on the number of parameters the function takes 34 * here are defines so we can easily locate where they are in the jump table 35 */ 36 37 //0 parameter functions 38 #define CALLGATE_mod_get_current "pushl $1\n\t" 39 #define CALLGATE_schedule "pushl $2\n\t" 40 #define CALLGATE_mod_get_jiffies "pushl $3\n\t" 41 //1 parameter functions 42 #define CALLGATE_DRIVERPRINTDIAG "pushl $1\n\t" 43 #define CALLGATE_DOEXIT "pushl $2\n\t" 44 #define CALLGATE_DODRIVERFINISH "pushl $3\n\t" 45 #define CALLGATE_misc_register "pushl $4\n\t" 46 #define CALLGATE_misc_deregister "pushl $5\n\t" 47 #define CALLGATE_unregister_sysctl_table "pushl $6\n\t" 48 #define CALLGATE_del_timer "pushl $7\n\t" 49 50 //2 parameter functions 51 #define CALLGATE_release_region "pushl $1\n\t" 52 #define CALLGATE_release_mem_region "pushl $2\n\t" 53 #define CALLGATE_register_sysctl_table "pushl $3\n\t" 54 #define CALLGATE_mod_timer "pushl $4\n\t" 55 #define CALLGATE___mod_timer "pushl $5\n\t" 56 #define CALLGATE_add_wait_queue "pushl $6\n\t" 57 #define CALLGATE_remove_wait_queue "pushl $7\n\t" 58 #define CALLGATE_free_irq "pushl $8\n\t" 59 #define CALLGATE_remove_proc_entry "pushl $9\n\t" 60 //3 parameter functions 61 #define CALLGATE_REGISTERCHRDEV "pushl $1\n\t" 62 #define CALLGATE_copy_from_user "pushl $2\n\t" 63 #define CALLGATE_copy_to_user "pushl $3\n\t" 64 #define CALLGATE_no_llseek "pushl $4\n\t" 65 #define CALLGATE_request_region "pushl $5\n\t" 66 #define CALLGATE_request_mem_region "pushl $6\n\t" 67 #define CALLGATE_kill_fasync "pushl $7\n\t" 68 #define CALLGATE_pollwait "pushl $8\n\t" 69 //4 parameter functions 70 #define CALLGATE___wake_up "pushl $1\n\t" 71 #define CALLGATE_fasync_helper "pushl $2\n\t" 72 //#define CALLGATE___request_region "pushl $1\n\t" 73 74 //5 parameter functions 75 #define CALLGATE_request_irq "pushl $1\n\t" 76 #define CALLGATE_create_proc_read_entry "pushl $2\n\t" 77 //10 parameter functions 78 #define CALLGATE_printk "pushl $1\n\t" 79 //15 parameter functions 80 #define CALLGATE_sprintf "pushl $1\n\t" 30 #define USE_RESERVED 0x40000000 81 31 #endif include/asm-i386/dapi.h
r20 r21 2 2 #define ASM_DAPI_H 3 3 4 #include <asm/callgate.h>5 4 #include <asm-generic/errno-base.h> 6 5 6 /* So here's what going on: 7 * we have a jump table for drivers calling into the kernel 8 * there is a seperate entry point based on the number of parameters the function takes 9 * here are defines so we can easily locate where they are in the jump table 10 */ 11 12 //0 parameter functions 13 #define CALLGATE_mod_get_current "pushl $1\n\t" 14 #define CALLGATE_schedule "pushl $2\n\t" 15 #define CALLGATE_mod_get_jiffies "pushl $3\n\t" 16 //1 parameter functions 17 #define CALLGATE_DRIVERPRINTDIAG "pushl $1\n\t" 18 #define CALLGATE_DOEXIT "pushl $2\n\t" 19 #define CALLGATE_DODRIVERFINISH "pushl $3\n\t" 20 #define CALLGATE_misc_register "pushl $4\n\t" 21 #define CALLGATE_misc_deregister "pushl $5\n\t" 22 #define CALLGATE_unregister_sysctl_table "pushl $6\n\t" 23 #define CALLGATE_del_timer "pushl $7\n\t" 24 #define CALLGATE_signal_pending "pushl $8\n\t" 25 //2 parameter functions 26 #define CALLGATE_release_region "pushl $1\n\t" 27 #define CALLGATE_release_mem_region "pushl $2\n\t" 28 #define CALLGATE_register_sysctl_table "pushl $3\n\t" 29 #define CALLGATE_mod_timer "pushl $4\n\t" 30 #define CALLGATE___mod_timer "pushl $5\n\t" 31 #define CALLGATE_add_wait_queue "pushl $6\n\t" 32 #define CALLGATE_remove_wait_queue "pushl $7\n\t" 33 #define CALLGATE_free_irq "pushl $8\n\t" 34 #define CALLGATE_remove_proc_entry "pushl $9\n\t" 35 //3 parameter functions 36 #define CALLGATE_REGISTERCHRDEV "pushl $1\n\t" 37 #define CALLGATE_copy_from_user "pushl $2\n\t" 38 #define CALLGATE_copy_to_user "pushl $3\n\t" 39 #define CALLGATE_no_llseek "pushl $4\n\t" 40 #define CALLGATE_request_region "pushl $5\n\t" 41 #define CALLGATE_request_mem_region "pushl $6\n\t" 42 #define CALLGATE_kill_fasync "pushl $7\n\t" 43 #define CALLGATE_poll_wait "pushl $8\n\t" 44 //4 parameter functions 45 #define CALLGATE___wake_up "pushl $1\n\t" 46 #define CALLGATE_fasync_helper "pushl $2\n\t" 47 //#define CALLGATE___request_region "pushl $1\n\t" 48 49 //5 parameter functions 50 #define CALLGATE_request_irq "pushl $1\n\t" 51 #define CALLGATE_create_proc_read_entry "pushl $2\n\t" 52 //10 parameter functions 53 #define CALLGATE_printk "pushl $1\n\t" 54 //15 parameter functions 55 #define CALLGATE_sprintf "pushl $1\n\t" 56 57 58 #define CALLEE "ecx", "edx" 7 59 #define make_wrap0(func, ret) \ 8 60 static inline ret func ( void ) { \ 9 61 ret myret; \ 10 62 asm volatile ( CALLGATE_ ## func \ 11 LCALL 1\12 : "=a"(myret) ); \63 LCALL0 \ 64 : "=a"(myret):: CALLEE ); \ 13 65 return myret; \ 14 66 } … … 19 71 CALLGATE_ ## func \ 20 72 LCALL1 \ 21 : "=a"(myret) : "g"(param1) ); \73 : "=a"(myret) : "g"(param1): CALLEE); \ 22 74 return myret; \ 23 75 } … … 31 83 CALLGATE_ ## func \ 32 84 LCALL2 \ 33 : "=a"(myret) : "g"(param2), "g"(param1) ); \85 : "=a"(myret) : "g"(param2), "g"(param1): CALLEE); \ 34 86 return myret; \ 35 87 } … … 44 96 CALLGATE_ ## func \ 45 97 LCALL3 \ 46 : "=a"(myret) : "g"(param3), "g"(param2), "g"(param1) ); \98 : "=a"(myret) : "g"(param3), "g"(param2), "g"(param1):CALLEE); \ 47 99 return myret; \ 48 100 } … … 58 110 CALLGATE_ ## func \ 59 111 LCALL4 \ 60 : "=a"(myret) : "g"(param4), "g"(param3), "g"(param2), "g"(param1) ); \112 : "=a"(myret) : "g"(param4), "g"(param3), "g"(param2), "g"(param1):CALLEE); \ 61 113 return myret; \ 62 114 } … … 72 124 CALLGATE_ ## func \ 73 125 LCALL5 \ 74 : "=a"(myret) : "m"(param5), "m"(param4), "m"(param3), "m"(param2), "m"(param1) ); \126 : "=a"(myret) : "m"(param5), "m"(param4), "m"(param3), "m"(param2), "m"(param1):CALLEE); \ 75 127 return myret; \ 76 128 } … … 78 130 static inline void func ( void ) { \ 79 131 asm volatile ( CALLGATE_ ## func \ 80 LCALL 1\81 ); \132 LCALL0 \ 133 :::CALLEE ); \ 82 134 } 83 135 #define make_void_wrap1(func, type1) \ … … 86 138 CALLGATE_ ## func \ 87 139 LCALL1 \ 88 : : "g"(param1) ); \140 : : "g"(param1):CALLEE); \ 89 141 } 90 142 … … 96 148 CALLGATE_ ## func \ 97 149 LCALL2 \ 98 : : "g"(param2), "g"(param1) ); \150 : : "g"(param2), "g"(param1):CALLEE); \ 99 151 } 100 152 … … 107 159 CALLGATE_ ## func \ 108 160 LCALL3 \ 109 : : "g"(param3), "g"(param2), "g"(param1) ); \161 : : "g"(param3), "g"(param2), "g"(param1):CALLEE); \ 110 162 } 111 163 … … 119 171 CALLGATE_ ## func \ 120 172 LCALL4 \ 121 : : "g"(param4), "g"(param3), "g"(param2), "g"(param1) ); \173 : : "g"(param4), "g"(param3), "g"(param2), "g"(param1):CALLEE); \ 122 174 } 123 175 #define make_wrap10(func, ret, type1, ... ) \ … … 203 255 make_wrap2(register_sysctl_table, struct ctl_table_header*, struct ctl_table*, int) 204 256 make_void_wrap1(unregister_sysctl_table, struct ctl_table_header*) 205 make_void_wrap0(schedule)206 257 make_wrap5(request_irq, int, unsigned int, irqhandler, unsigned long, const char*, void *) 207 258 make_wrap2(mod_timer, int, struct timer_list*, unsigned long) … … 213 264 make_void_wrap2(add_wait_queue, struct __wait_queue_head *, struct __wait_queue*) 214 265 make_void_wrap2(remove_wait_queue, struct __wait_queue_head *, struct __wait_queue*) 215 make_void_wrap3(poll wait, struct file *, struct __wait_queue_head *, struct poll_table_struct *)266 make_void_wrap3(poll_wait, struct file *, struct __wait_queue_head *, struct poll_table_struct *) 216 267 make_wrap5(create_proc_read_entry, struct proc_dir_entry*, const char*, unsigned long, struct proc_dir_entry *, readproc * , void *) 217 268 make_void_wrap2(free_irq, unsigned int, void *) … … 219 270 make_wrap15(sprintf, int, char *, const char *) 220 271 make_wrap0(mod_get_jiffies, unsigned long) 221 272 make_wrap1(signal_pending, int, struct task_struct *) 273 274 static inline void schedule(void) { 275 asm("movl $286, %eax\n\t" 276 "int $0x80\n\t" 277 ); 278 } 222 279 static inline void arediculouslylongnamesoitwontconflictiwthanythingbutgccwontcomplainaboutsprintf(void) { 223 280 sprintf(NULL, NULL, NULL); include/linux/module.h
r16 r21 54 54 extern void cleanup_module(void); 55 55 56 extern struct task_struct *find_worker_thread(unsigned long addr );56 extern struct task_struct *find_worker_thread(unsigned long addr, int use_reserved); 57 57 extern char *find_module_by_thread(unsigned long addr); 58 58 include/linux/poll.h
r20 r21 27 27 p->qproc(filp, wait_address, p); 28 28 } 29 extern void mod_poll_wait(struct file *, wait_queue_head_t *, poll_table *); 29 30 #endif 30 31 #ifdef MODULE include/linux/sched.h
r20 r21 1007 1007 clear_tsk_thread_flag(tsk,TIF_NEED_RESCHED); 1008 1008 } 1009 1009 #ifndef MODULE 1010 1010 static inline int signal_pending(struct task_struct *p) 1011 1011 { 1012 1012 return unlikely(test_tsk_thread_flag(p,TIF_SIGPENDING)); 1013 1013 } 1014 1014 extern int mod_signal_pending(struct task_struct *p); 1015 #endif 1016 #ifdef MODULE 1017 extern int signal_pending(struct task_struct *); 1018 #endif 1015 1019 static inline int need_resched(void) 1016 1020 { include/linux/wait.h
r1 r21 81 81 } 82 82 83 extern void FASTCALL(add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait));83 extern void add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait); 84 84 extern void FASTCALL(add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t * wait)); 85 extern void FASTCALL(remove_wait_queue(wait_queue_head_t *q, wait_queue_t * wait));85 extern void remove_wait_queue(wait_queue_head_t *q, wait_queue_t * wait); 86 86 87 87 static inline void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new) … … 105 105 } 106 106 107 void FASTCALL(__wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key));107 void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key); 108 108 extern void FASTCALL(__wake_up_locked(wait_queue_head_t *q, unsigned int mode)); 109 109 extern void FASTCALL(__wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr)); kernel/exit.c
r20 r21 841 841 if (tsk->currentmapped) { 842 842 ClearPageReserved(pfn_to_page(__pa(tsk) >> PAGE_SHIFT)); 843 ClearPageReserved(pfn_to_page((__pa(tsk) >> PAGE_SHIFT) + 1)); 843 844 vunmap(tsk->origcurrentaddr); 844 845 tsk->currentmapped=0; 845 846 } 846 task_pt_regs(tsk)->esp -=tsk->bytes_to_pop;847 task_pt_regs(tsk)->esp+=tsk->bytes_to_pop; 847 848 tsk->bytes_to_pop=0; 848 849 tsk->available=1; kernel/fork.c
r20 r21 99 99 { 100 100 unsigned long flags; 101 102 101 wait->flags &= ~WQ_FLAG_EXCLUSIVE; 103 102 spin_lock_irqsave(&q->lock, flags); … … 123 122 { 124 123 unsigned long flags; 125 126 124 spin_lock_irqsave(&q->lock, flags); 127 125 __remove_wait_queue(q, wait); kernel/module.c
r18 r21 629 629 testargs=31415926; 630 630 if (mod->exit) 631 calldriver((unsigned long) mod->exit, NULL, 0, NULL, 0);631 calldriver((unsigned long) mod->exit, NULL, 0, NULL, USE_RESERVED); 632 632 down(&module_mutex); 633 633 //NEW: get rid of threads … … 1931 1931 } 1932 1932 1933 struct task_struct *find_worker_thread(unsigned long addr )1933 struct task_struct *find_worker_thread(unsigned long addr, int use_reserved) 1934 1934 { 1935 1935 struct task_struct *tsk=NULL; … … 1944 1944 within(addr, mod->module_core, mod->core_size)) { 1945 1945 //Now find an availalbe one 1946 while (i < NR_DRIVERTHREADS) {1946 while (i < (NR_DRIVERTHREADS-1+use_reserved)) { 1947 1947 if (mod->worker_threads[i]->available) { 1948 1948 tsk=mod->worker_threads[i]; kernel/printk.c
r6 r21 377 377 } 378 378 379 asmlinkage void sys_printdiag( void)380 { 381 printk(" KERNEL DIAGNOSTIC MESSAGE");379 asmlinkage void sys_printdiag(unsigned long param) 380 { 381 printk("Called to print %x\n", param); 382 382 } 383 383 kernel/sched.c
r20 r21 2177 2177 #endif 2178 2178 2179 void __sched mod_schedule(void) {2179 asmlinkage void __sched mod_schedule(void) { 2180 2180 schedule(); 2181 2181 } … … 4060 4060 EXPORT_SYMBOL(__preempt_write_lock); 4061 4061 #endif /* defined(CONFIG_SMP) && defined(CONFIG_PREEMPT) */ 4062 4063 int mod_signal_pending(struct task_struct *p) { 4064 return signal_pending(p); 4065 } kernel/timer.c
r20 r21 37 37 #include <asm/div64.h> 38 38 #include <asm/timex.h> 39 39 #include <asm/callgate.h> 40 40 /* 41 41 * per-CPU timer vector definitions: .version
r20 r21 1 2 021 238
