Build fix for MIPS.

Sponsored by:	Mellanox Technologies
This commit is contained in:
Hans Petter Selasky 2015-10-26 09:34:43 +00:00
parent 59acd4badb
commit dfcc270f25
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=289993

View File

@ -64,9 +64,12 @@ struct task_struct {
int should_stop;
};
#define current ((struct task_struct *)curthread->td_retval[1])
#define task_struct_get(x) (struct task_struct *)(x)->td_retval[1]
#define task_struct_set(x, y) (x)->td_retval[1] = (register_t)(y)
#define current task_struct_get(curthread)
#define task_struct_get(x) ((struct task_struct *)(uintptr_t)(x)->td_retval[1])
#define task_struct_set(x, y) (x)->td_retval[1] = (uintptr_t)(y)
/* ensure the task_struct pointer fits into the td_retval[1] field */
CTASSERT(sizeof(((struct thread *)0)->td_retval[1]) >= sizeof(uintptr_t));
#define set_current_state(x) \
atomic_store_rel_int((volatile int *)&current->state, (x))