#ifndef _ASM_BSP_CURRENT_H_
#define _ASM_BSP_CURRENT_H_

#include <asm/processor.h>
#include <asm/debug.h>

extern struct task_struct *current_var;

static inline struct task_struct * get_current(void)
{
	/* 
         * use current kernel stack pointer 
         * to determine location
	 * of current task struct 
         */
	u32 stackvar;
	u32 cur = (u32)&stackvar & ~(KERNEL_STACK_SIZE - 1);

	return (struct task_struct *)cur;
}
 
#define current get_current()

#endif	/* _ASM_BSP_CURRENT_H_ */
