/* * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Licensed under the GPL */ #ifndef __UM_THREAD_INFO_H #define __UM_THREAD_INFO_H #ifndef __ASSEMBLY__ #include <asm/types.h> #include <asm/page.h> #include <asm/segment.h> #include <sysdep/ptrace_user.h> struct thread_info { struct task_struct *task; /* main task structure */ unsigned long flags; /* low level flags */ __u32 cpu; /* current CPU */ int preempt_count; /* 0 => preemptable, <0 => BUG */ mm_segment_t addr_limit; /* thread address space: 0-0xBFFFFFFF for user 0-0xFFFFFFFF for kernel */ struct thread_info *real_thread; /* Points to non-IRQ stack */ unsigned long aux_fp_regs[FP_SIZE]; /* auxiliary fp_regs to save/restore them out-of-band */ }; #define INIT_THREAD_INFO(tsk) \ { \ .task = &tsk, \ .flags = 0, \ .cpu = 0, \ .preempt_count = INIT_PREEMPT_COUNT, \ .addr_limit = KERNEL_DS, \ .real_thread = NULL, \ } #define init_thread_info (init_thread_union.thread_info) #define init_stack (init_thread_union.stack) #define THREAD_SIZE ((1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE) /* how to get the thread information struct from C */
static inline struct thread_info *current_thread_info(void) { struct thread_info *ti; unsigned long mask = THREAD_SIZE - 1; void *p; asm volatile ("" : "=r" (p) : "0" (&ti)); ti = (struct thread_info *) (((unsigned long)p) & ~mask); return ti; }Contributors
Person | Tokens | Prop | Commits | CommitProp |
Jeff Dike | 38 | 70.37% | 2 | 40.00% |
Paolo 'Blaisorblade' Giarrusso | 8 | 14.81% | 2 | 40.00% |
Richard Weinberger | 8 | 14.81% | 1 | 20.00% |
Total | 54 | 100.00% | 5 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Jeff Dike | 150 | 70.75% | 7 | 36.84% |
Paolo 'Blaisorblade' Giarrusso | 20 | 9.43% | 2 | 10.53% |
Thomas Meyer | 11 | 5.19% | 1 | 5.26% |
Richard Weinberger | 10 | 4.72% | 3 | 15.79% |
Mickaël Salaün | 9 | 4.25% | 1 | 5.26% |
Andrea Arcangeli | 4 | 1.89% | 1 | 5.26% |
Al Viro | 4 | 1.89% | 1 | 5.26% |
FUJITA Tomonori | 2 | 0.94% | 1 | 5.26% |
Jesper Juhl | 1 | 0.47% | 1 | 5.26% |
Andreas Dilger | 1 | 0.47% | 1 | 5.26% |
Total | 212 | 100.00% | 19 | 100.00% |