Root/target/linux/ubicom32/files/arch/ubicom32/include/asm/current.h

1/*
2 * arch/ubicom32/include/asm/current.h
3 * Definition of get_current() for Ubicom32 architecture.
4 *
5 * (C) Copyright 2009, Ubicom, Inc.
6 * (C) Copyright 2000, Lineo, David McCullough <davidm@uclinux.org>
7 * (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com)
8 *
9 * This file is part of the Ubicom32 Linux Kernel Port.
10 *
11 * The Ubicom32 Linux Kernel Port is free software: you can redistribute
12 * it and/or modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation, either version 2 of the
14 * License, or (at your option) any later version.
15 *
16 * The Ubicom32 Linux Kernel Port is distributed in the hope that it
17 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
18 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
19 * the GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with the Ubicom32 Linux Kernel Port. If not,
23 * see <http://www.gnu.org/licenses/>.
24 *
25 * Ubicom32 implementation derived from (with many thanks):
26 * arch/m68knommu
27 * arch/blackfin
28 * arch/parisc
29 */
30#ifndef _ASM_UBICOM32_CURRENT_H
31#define _ASM_UBICOM32_CURRENT_H
32
33#include <linux/thread_info.h>
34
35struct task_struct;
36
37static inline struct task_struct *get_current(void)
38{
39    return(current_thread_info()->task);
40}
41
42#define current get_current()
43
44#endif /* _ASM_UBICOM32_CURRENT_H */
45

Archive Download this file



interactive