root/include/linux/sched.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. add_wait_queue
  2. remove_wait_queue
  3. select_wait
  4. down
  5. up
  6. _get_base
  7. get_limit

   1 #ifndef _LINUX_SCHED_H
   2 #define _LINUX_SCHED_H
   3 
   4 /*
   5  * define DEBUG if you want the wait-queues to have some extra
   6  * debugging code. It's not normally used, but might catch some
   7  * wait-queue coding errors.
   8  *
   9  *  #define DEBUG
  10  */
  11 
  12 #define HZ 100
  13 
  14 /*
  15  * System setup and hardware bug flags..
  16  */
  17 extern char hard_math;
  18 extern char x86;                /* lower 4 bits */
  19 extern char x86_vendor_id[13];
  20 extern char x86_model;          /* lower 4 bits */
  21 extern char x86_mask;           /* lower 4 bits */
  22 extern int  x86_capability;     /* field of flags */
  23 extern int  fdiv_bug;           
  24 extern char ignore_irq13;
  25 extern char wp_works_ok;                /* doesn't work on a 386 */
  26 extern char hlt_works_ok;       /* problems on some 486Dx4's and old 386's */
  27 
  28 extern unsigned long intr_count;
  29 extern unsigned long event;
  30 
  31 #define start_bh_atomic() \
  32 __asm__ __volatile__("incl _intr_count")
  33 
  34 #define end_bh_atomic() \
  35 __asm__ __volatile__("decl _intr_count")
  36 
  37 /*
  38  * Bus types (default is ISA, but people can check others with these..)
  39  * MCA_bus hardcoded to 0 for now.
  40  */
  41 extern int EISA_bus;
  42 #define MCA_bus 0
  43 
  44 #include <linux/binfmts.h>
  45 #include <linux/personality.h>
  46 #include <linux/tasks.h>
  47 #include <asm/system.h>
  48 
  49 /*
  50  * User space process size: 3GB. This is hardcoded into a few places,
  51  * so don't change it unless you know what you are doing.
  52  */
  53 #define TASK_SIZE       0xc0000000
  54 
  55 /*
  56  * Size of io_bitmap in longwords: 32 is ports 0-0x3ff.
  57  */
  58 #define IO_BITMAP_SIZE  32
  59 
  60 /*
  61  * These are the constant used to fake the fixed-point load-average
  62  * counting. Some notes:
  63  *  - 11 bit fractions expand to 22 bits by the multiplies: this gives
  64  *    a load-average precision of 10 bits integer + 11 bits fractional
  65  *  - if you want to count load-averages more often, you need more
  66  *    precision, or rounding will get you. With 2-second counting freq,
  67  *    the EXP_n values would be 1981, 2034 and 2043 if still using only
  68  *    11 bit fractions.
  69  */
  70 extern unsigned long avenrun[];         /* Load averages */
  71 
  72 #define FSHIFT          11              /* nr of bits of precision */
  73 #define FIXED_1         (1<<FSHIFT)     /* 1.0 as fixed-point */
  74 #define LOAD_FREQ       (5*HZ)          /* 5 sec intervals */
  75 #define EXP_1           1884            /* 1/exp(5sec/1min) as fixed-point */
  76 #define EXP_5           2014            /* 1/exp(5sec/5min) */
  77 #define EXP_15          2037            /* 1/exp(5sec/15min) */
  78 
  79 #define CALC_LOAD(load,exp,n) \
  80         load *= exp; \
  81         load += n*(FIXED_1-exp); \
  82         load >>= FSHIFT;
  83 
  84 #define CT_TO_SECS(x)   ((x) / HZ)
  85 #define CT_TO_USECS(x)  (((x) % HZ) * 1000000/HZ)
  86 
  87 #define FIRST_TASK task[0]
  88 #define LAST_TASK task[NR_TASKS-1]
  89 
  90 #include <linux/head.h>
  91 #include <linux/fs.h>
  92 #include <linux/mm.h>
  93 #include <linux/signal.h>
  94 #include <linux/time.h>
  95 #include <linux/param.h>
  96 #include <linux/resource.h>
  97 #include <linux/vm86.h>
  98 #include <linux/math_emu.h>
  99 #include <linux/ptrace.h>
 100 
 101 #define TASK_RUNNING            0
 102 #define TASK_INTERRUPTIBLE      1
 103 #define TASK_UNINTERRUPTIBLE    2
 104 #define TASK_ZOMBIE             3
 105 #define TASK_STOPPED            4
 106 #define TASK_SWAPPING           5
 107 
 108 #ifndef NULL
 109 #define NULL ((void *) 0)
 110 #endif
 111 
 112 #ifdef __KERNEL__
 113 
 114 extern void sched_init(void);
 115 extern void show_state(void);
 116 extern void trap_init(void);
 117 
 118 asmlinkage void schedule(void);
 119 
 120 #endif /* __KERNEL__ */
 121 
 122 struct i387_hard_struct {
 123         long    cwd;
 124         long    swd;
 125         long    twd;
 126         long    fip;
 127         long    fcs;
 128         long    foo;
 129         long    fos;
 130         long    st_space[20];   /* 8*10 bytes for each FP-reg = 80 bytes */
 131 };
 132 
 133 struct i387_soft_struct {
 134         long    cwd;
 135         long    swd;
 136         long    twd;
 137         long    fip;
 138         long    fcs;
 139         long    foo;
 140         long    fos;
 141         long    top;
 142         struct fpu_reg  regs[8];        /* 8*16 bytes for each FP-reg = 128 bytes */
 143         unsigned char   lookahead;
 144         struct info     *info;
 145         unsigned long   entry_eip;
 146 };
 147 
 148 union i387_union {
 149         struct i387_hard_struct hard;
 150         struct i387_soft_struct soft;
 151 };
 152 
 153 struct tss_struct {
 154         unsigned short  back_link,__blh;
 155         unsigned long   esp0;
 156         unsigned short  ss0,__ss0h;
 157         unsigned long   esp1;
 158         unsigned short  ss1,__ss1h;
 159         unsigned long   esp2;
 160         unsigned short  ss2,__ss2h;
 161         unsigned long   cr3;
 162         unsigned long   eip;
 163         unsigned long   eflags;
 164         unsigned long   eax,ecx,edx,ebx;
 165         unsigned long   esp;
 166         unsigned long   ebp;
 167         unsigned long   esi;
 168         unsigned long   edi;
 169         unsigned short  es, __esh;
 170         unsigned short  cs, __csh;
 171         unsigned short  ss, __ssh;
 172         unsigned short  ds, __dsh;
 173         unsigned short  fs, __fsh;
 174         unsigned short  gs, __gsh;
 175         unsigned short  ldt, __ldth;
 176         unsigned short  trace, bitmap;
 177         unsigned long   io_bitmap[IO_BITMAP_SIZE+1];
 178         unsigned long   tr;
 179         unsigned long   cr2, trap_no, error_code;
 180         union i387_union i387;
 181 };
 182 
 183 #define INIT_TSS  { \
 184         0,0, \
 185         sizeof(init_kernel_stack) + (long) &init_kernel_stack, \
 186         KERNEL_DS, 0, \
 187         0,0,0,0,0,0, \
 188         (long) &swapper_pg_dir, \
 189         0,0,0,0,0,0,0,0,0,0, \
 190         USER_DS,0,USER_DS,0,USER_DS,0,USER_DS,0,USER_DS,0,USER_DS,0, \
 191         _LDT(0),0, \
 192         0, 0x8000, \
 193         {~0, }, /* ioperm */ \
 194         _TSS(0), 0, 0,0, \
 195         { { 0, }, }  /* 387 state */ \
 196 }
 197 
 198 struct files_struct {
 199         int count;
 200         fd_set close_on_exec;
 201         struct file * fd[NR_OPEN];
 202 };
 203 
 204 #define INIT_FILES { \
 205         0, \
 206         { { 0, } }, \
 207         { NULL, } \
 208 }
 209 
 210 struct fs_struct {
 211         int count;
 212         unsigned short umask;
 213         struct inode * root, * pwd;
 214 };
 215 
 216 #define INIT_FS { \
 217         0, \
 218         0022, \
 219         NULL, NULL \
 220 }
 221 
 222 struct mm_struct {
 223         int count;
 224         unsigned long start_code, end_code, end_data;
 225         unsigned long start_brk, brk, start_stack, start_mmap;
 226         unsigned long arg_start, arg_end, env_start, env_end;
 227         unsigned long rss;
 228         unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt;
 229         int swappable:1;
 230         unsigned long swap_address;
 231         unsigned long old_maj_flt;      /* old value of maj_flt */
 232         unsigned long dec_flt;          /* page fault count of the last time */
 233         unsigned long swap_cnt;         /* number of pages to swap on next pass */
 234         struct vm_area_struct * mmap;
 235 };
 236 
 237 #define INIT_MMAP { &init_task, 0, 0x40000000, PAGE_SHARED, }
 238 
 239 #define INIT_MM { \
 240                 0, \
 241                 0, 0, 0, \
 242                 0, 0, 0, 0, \
 243                 0, 0, 0, 0, \
 244                 0, \
 245 /* ?_flt */     0, 0, 0, 0, \
 246                 0, \
 247 /* swap */      0, 0, 0, 0, \
 248                 &init_mmap }
 249 
 250 struct task_struct {
 251 /* these are hardcoded - don't touch */
 252         volatile long state;    /* -1 unrunnable, 0 runnable, >0 stopped */
 253         long counter;
 254         long priority;
 255         unsigned long signal;
 256         unsigned long blocked;  /* bitmap of masked signals */
 257         unsigned long flags;    /* per process flags, defined below */
 258         int errno;
 259         int debugreg[8];  /* Hardware debugging registers */
 260         struct exec_domain *exec_domain;
 261 /* various fields */
 262         struct linux_binfmt *binfmt;
 263         struct task_struct *next_task, *prev_task;
 264         struct sigaction sigaction[32];
 265         unsigned long saved_kernel_stack;
 266         unsigned long kernel_stack_page;
 267         int exit_code, exit_signal;
 268         unsigned long personality;
 269         int dumpable:1;
 270         int did_exec:1;
 271         int pid,pgrp,session,leader;
 272         int     groups[NGROUPS];
 273         /* 
 274          * pointers to (original) parent process, youngest child, younger sibling,
 275          * older sibling, respectively.  (p->father can be replaced with 
 276          * p->p_pptr->pid)
 277          */
 278         struct task_struct *p_opptr, *p_pptr, *p_cptr, *p_ysptr, *p_osptr;
 279         struct wait_queue *wait_chldexit;       /* for wait4() */
 280         unsigned short uid,euid,suid,fsuid;
 281         unsigned short gid,egid,sgid,fsgid;
 282         unsigned long timeout;
 283         unsigned long it_real_value, it_prof_value, it_virt_value;
 284         unsigned long it_real_incr, it_prof_incr, it_virt_incr;
 285         long utime, stime, cutime, cstime, start_time;
 286         struct rlimit rlim[RLIM_NLIMITS]; 
 287         unsigned short used_math;
 288         char comm[16];
 289 /* virtual 86 mode stuff */
 290         struct vm86_struct * vm86_info;
 291         unsigned long screen_bitmap;
 292         unsigned long v86flags, v86mask, v86mode;
 293 /* file system info */
 294         int link_count;
 295         struct tty_struct *tty; /* NULL if no tty */
 296 /* ipc stuff */
 297         struct sem_undo *semundo;
 298 /* ldt for this task - used by Wine.  If NULL, default_ldt is used */
 299         struct desc_struct *ldt;
 300 /* tss for this task */
 301         struct tss_struct tss;
 302 /* filesystem information */
 303         struct fs_struct fs[1];
 304 /* open file information */
 305         struct files_struct files[1];
 306 /* memory management info */
 307         struct mm_struct mm[1];
 308 };
 309 
 310 /*
 311  * Per process flags
 312  */
 313 #define PF_ALIGNWARN    0x00000001      /* Print alignment warning msgs */
 314                                         /* Not implemented yet, only for 486*/
 315 #define PF_PTRACED      0x00000010      /* set if ptrace (0) has been called. */
 316 #define PF_TRACESYS     0x00000020      /* tracing system calls */
 317 
 318 /*
 319  * cloning flags:
 320  */
 321 #define CSIGNAL         0x000000ff      /* signal mask to be sent at exit */
 322 #define COPYVM          0x00000100      /* set if VM copy desired (like normal fork()) */
 323 #define COPYFD          0x00000200      /* set if fd's should be copied, not shared (NI) */
 324 
 325 /*
 326  *  INIT_TASK is used to set up the first task table, touch at
 327  * your own risk!. Base=0, limit=0x1fffff (=2MB)
 328  */
 329 #define INIT_TASK \
 330 /* state etc */ { 0,15,15,0,0,0,0, \
 331 /* debugregs */ { 0, },            \
 332 /* exec domain */&default_exec_domain, \
 333 /* binfmt */    NULL, \
 334 /* schedlink */ &init_task,&init_task, \
 335 /* signals */   {{ 0, },}, \
 336 /* stack */     0,(unsigned long) &init_kernel_stack, \
 337 /* ec,brk... */ 0,0,0,0,0, \
 338 /* pid etc.. */ 0,0,0,0, \
 339 /* suppl grps*/ {NOGROUP,}, \
 340 /* proc links*/ &init_task,&init_task,NULL,NULL,NULL,NULL, \
 341 /* uid etc */   0,0,0,0,0,0,0,0, \
 342 /* timeout */   0,0,0,0,0,0,0,0,0,0,0,0, \
 343 /* rlimits */   { {LONG_MAX, LONG_MAX}, {LONG_MAX, LONG_MAX},  \
 344                   {LONG_MAX, LONG_MAX}, {LONG_MAX, LONG_MAX},  \
 345                   {       0, LONG_MAX}, {LONG_MAX, LONG_MAX}}, \
 346 /* math */      0, \
 347 /* comm */      "swapper", \
 348 /* vm86_info */ NULL, 0, 0, 0, 0, \
 349 /* fs info */   0,NULL, \
 350 /* ipc */       NULL, \
 351 /* ldt */       NULL, \
 352 /* tss */       INIT_TSS, \
 353 /* fs */        { INIT_FS }, \
 354 /* files */     { INIT_FILES }, \
 355 /* mm */        { INIT_MM } \
 356 }
 357 
 358 #ifdef __KERNEL__
 359 
 360 extern struct task_struct init_task;
 361 extern struct task_struct *task[NR_TASKS];
 362 extern struct task_struct *last_task_used_math;
 363 extern struct task_struct *current;
 364 extern unsigned long volatile jiffies;
 365 extern unsigned long itimer_ticks;
 366 extern unsigned long itimer_next;
 367 extern struct timeval xtime;
 368 extern int need_resched;
 369 
 370 #define CURRENT_TIME (xtime.tv_sec)
 371 
 372 extern void sleep_on(struct wait_queue ** p);
 373 extern void interruptible_sleep_on(struct wait_queue ** p);
 374 extern void wake_up(struct wait_queue ** p);
 375 extern void wake_up_interruptible(struct wait_queue ** p);
 376 
 377 extern void notify_parent(struct task_struct * tsk);
 378 extern int send_sig(unsigned long sig,struct task_struct * p,int priv);
 379 extern int in_group_p(gid_t grp);
 380 
 381 extern int request_irq(unsigned int irq,void (*handler)(int), unsigned long flags, const char *device);
 382 extern void free_irq(unsigned int irq);
 383 
 384 /*
 385  * Entry into gdt where to find first TSS. GDT layout:
 386  *   0 - nul
 387  *   1 - kernel code segment
 388  *   2 - kernel data segment
 389  *   3 - user code segment
 390  *   4 - user data segment
 391  * ...
 392  *   8 - TSS #0
 393  *   9 - LDT #0
 394  *  10 - TSS #1
 395  *  11 - LDT #1
 396  */
 397 #define FIRST_TSS_ENTRY 8
 398 #define FIRST_LDT_ENTRY (FIRST_TSS_ENTRY+1)
 399 #define _TSS(n) ((((unsigned long) n)<<4)+(FIRST_TSS_ENTRY<<3))
 400 #define _LDT(n) ((((unsigned long) n)<<4)+(FIRST_LDT_ENTRY<<3))
 401 #define load_TR(n) __asm__("ltr %%ax": /* no output */ :"a" (_TSS(n)))
 402 #define load_ldt(n) __asm__("lldt %%ax": /* no output */ :"a" (_LDT(n)))
 403 #define store_TR(n) \
 404 __asm__("str %%ax\n\t" \
 405         "subl %2,%%eax\n\t" \
 406         "shrl $4,%%eax" \
 407         :"=a" (n) \
 408         :"0" (0),"i" (FIRST_TSS_ENTRY<<3))
 409 /*
 410  *      switch_to(n) should switch tasks to task nr n, first
 411  * checking that n isn't the current task, in which case it does nothing.
 412  * This also clears the TS-flag if the task we switched to has used
 413  * tha math co-processor latest.
 414  */
 415 #define switch_to(tsk) \
 416 __asm__("cli\n\t" \
 417         "xchgl %%ecx,_current\n\t" \
 418         "ljmp %0\n\t" \
 419         "sti\n\t" \
 420         "cmpl %%ecx,_last_task_used_math\n\t" \
 421         "jne 1f\n\t" \
 422         "clts\n" \
 423         "1:" \
 424         : /* no output */ \
 425         :"m" (*(((char *)&tsk->tss.tr)-4)), \
 426          "c" (tsk) \
 427         :"cx")
 428 
 429 #define _set_base(addr,base) \
 430 __asm__("movw %%dx,%0\n\t" \
 431         "rorl $16,%%edx\n\t" \
 432         "movb %%dl,%1\n\t" \
 433         "movb %%dh,%2" \
 434         : /* no output */ \
 435         :"m" (*((addr)+2)), \
 436          "m" (*((addr)+4)), \
 437          "m" (*((addr)+7)), \
 438          "d" (base) \
 439         :"dx")
 440 
 441 #define _set_limit(addr,limit) \
 442 __asm__("movw %%dx,%0\n\t" \
 443         "rorl $16,%%edx\n\t" \
 444         "movb %1,%%dh\n\t" \
 445         "andb $0xf0,%%dh\n\t" \
 446         "orb %%dh,%%dl\n\t" \
 447         "movb %%dl,%1" \
 448         : /* no output */ \
 449         :"m" (*(addr)), \
 450          "m" (*((addr)+6)), \
 451          "d" (limit) \
 452         :"dx")
 453 
 454 #define set_base(ldt,base) _set_base( ((char *)&(ldt)) , base )
 455 #define set_limit(ldt,limit) _set_limit( ((char *)&(ldt)) , (limit-1)>>12 )
 456 
 457 /*
 458  * The wait-queues are circular lists, and you have to be *very* sure
 459  * to keep them correct. Use only these two functions to add/remove
 460  * entries in the queues.
 461  */
 462 extern inline void add_wait_queue(struct wait_queue ** p, struct wait_queue * wait)
     /* [previous][next][first][last][top][bottom][index][help] */
 463 {
 464         unsigned long flags;
 465 
 466 #ifdef DEBUG
 467         if (wait->next) {
 468                 unsigned long pc;
 469                 __asm__ __volatile__("call 1f\n"
 470                         "1:\tpopl %0":"=r" (pc));
 471                 printk("add_wait_queue (%08x): wait->next = %08x\n",pc,(unsigned long) wait->next);
 472         }
 473 #endif
 474         save_flags(flags);
 475         cli();
 476         if (!*p) {
 477                 wait->next = wait;
 478                 *p = wait;
 479         } else {
 480                 wait->next = (*p)->next;
 481                 (*p)->next = wait;
 482         }
 483         restore_flags(flags);
 484 }
 485 
 486 extern inline void remove_wait_queue(struct wait_queue ** p, struct wait_queue * wait)
     /* [previous][next][first][last][top][bottom][index][help] */
 487 {
 488         unsigned long flags;
 489         struct wait_queue * tmp;
 490 #ifdef DEBUG
 491         unsigned long ok = 0;
 492 #endif
 493 
 494         save_flags(flags);
 495         cli();
 496         if ((*p == wait) &&
 497 #ifdef DEBUG
 498             (ok = 1) &&
 499 #endif
 500             ((*p = wait->next) == wait)) {
 501                 *p = NULL;
 502         } else {
 503                 tmp = wait;
 504                 while (tmp->next != wait) {
 505                         tmp = tmp->next;
 506 #ifdef DEBUG
 507                         if (tmp == *p)
 508                                 ok = 1;
 509 #endif
 510                 }
 511                 tmp->next = wait->next;
 512         }
 513         wait->next = NULL;
 514         restore_flags(flags);
 515 #ifdef DEBUG
 516         if (!ok) {
 517                 printk("removed wait_queue not on list.\n");
 518                 printk("list = %08x, queue = %08x\n",(unsigned long) p, (unsigned long) wait);
 519                 __asm__("call 1f\n1:\tpopl %0":"=r" (ok));
 520                 printk("eip = %08x\n",ok);
 521         }
 522 #endif
 523 }
 524 
 525 extern inline void select_wait(struct wait_queue ** wait_address, select_table * p)
     /* [previous][next][first][last][top][bottom][index][help] */
 526 {
 527         struct select_table_entry * entry;
 528 
 529         if (!p || !wait_address)
 530                 return;
 531         if (p->nr >= __MAX_SELECT_TABLE_ENTRIES)
 532                 return;
 533         entry = p->entry + p->nr;
 534         entry->wait_address = wait_address;
 535         entry->wait.task = current;
 536         entry->wait.next = NULL;
 537         add_wait_queue(wait_address,&entry->wait);
 538         p->nr++;
 539 }
 540 
 541 extern void __down(struct semaphore * sem);
 542 
 543 /*
 544  * These are not yet interrupt-safe
 545  */
 546 extern inline void down(struct semaphore * sem)
     /* [previous][next][first][last][top][bottom][index][help] */
 547 {
 548         if (sem->count <= 0)
 549                 __down(sem);
 550         sem->count--;
 551 }
 552 
 553 extern inline void up(struct semaphore * sem)
     /* [previous][next][first][last][top][bottom][index][help] */
 554 {
 555         sem->count++;
 556         wake_up(&sem->wait);
 557 }       
 558 
 559 static inline unsigned long _get_base(char * addr)
     /* [previous][next][first][last][top][bottom][index][help] */
 560 {
 561         unsigned long __base;
 562         __asm__("movb %3,%%dh\n\t"
 563                 "movb %2,%%dl\n\t"
 564                 "shll $16,%%edx\n\t"
 565                 "movw %1,%%dx"
 566                 :"=&d" (__base)
 567                 :"m" (*((addr)+2)),
 568                  "m" (*((addr)+4)),
 569                  "m" (*((addr)+7)));
 570         return __base;
 571 }
 572 
 573 #define get_base(ldt) _get_base( ((char *)&(ldt)) )
 574 
 575 static inline unsigned long get_limit(unsigned long segment)
     /* [previous][next][first][last][top][bottom][index][help] */
 576 {
 577         unsigned long __limit;
 578         __asm__("lsll %1,%0"
 579                 :"=r" (__limit):"r" (segment));
 580         return __limit+1;
 581 }
 582 
 583 #define REMOVE_LINKS(p) do { unsigned long flags; \
 584         save_flags(flags) ; cli(); \
 585         (p)->next_task->prev_task = (p)->prev_task; \
 586         (p)->prev_task->next_task = (p)->next_task; \
 587         restore_flags(flags); \
 588         if ((p)->p_osptr) \
 589                 (p)->p_osptr->p_ysptr = (p)->p_ysptr; \
 590         if ((p)->p_ysptr) \
 591                 (p)->p_ysptr->p_osptr = (p)->p_osptr; \
 592         else \
 593                 (p)->p_pptr->p_cptr = (p)->p_osptr; \
 594         } while (0)
 595 
 596 #define SET_LINKS(p) do { unsigned long flags; \
 597         save_flags(flags); cli(); \
 598         (p)->next_task = &init_task; \
 599         (p)->prev_task = init_task.prev_task; \
 600         init_task.prev_task->next_task = (p); \
 601         init_task.prev_task = (p); \
 602         restore_flags(flags); \
 603         (p)->p_ysptr = NULL; \
 604         if (((p)->p_osptr = (p)->p_pptr->p_cptr) != NULL) \
 605                 (p)->p_osptr->p_ysptr = p; \
 606         (p)->p_pptr->p_cptr = p; \
 607         } while (0)
 608 
 609 #define for_each_task(p) \
 610         for (p = &init_task ; (p = p->next_task) != &init_task ; )
 611 
 612 /*
 613  * This is the ldt that every process will get unless we need
 614  * something other than this.
 615  */
 616 extern struct desc_struct default_ldt;
 617 
 618 /* This special macro can be used to load a debugging register */
 619 
 620 #define loaddebug(register) \
 621                 __asm__("movl %0,%%edx\n\t" \
 622                         "movl %%edx,%%db" #register "\n\t" \
 623                         : /* no output */ \
 624                         :"m" (current->debugreg[register]) \
 625                         :"dx");
 626 
 627 #endif /* __KERNEL__ */
 628 
 629 #endif

/* [previous][next][first][last][top][bottom][index][help] */