summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/pcpu.h
diff options
context:
space:
mode:
authorJennifer Averett <jennifer.averett@oarcorp.com>2012-07-17 08:20:46 -0500
committerJennifer Averett <jennifer.averett@oarcorp.com>2012-07-17 08:20:46 -0500
commit325120c8755aa974a03fc85f020857fbec9cc071 (patch)
tree459dbd5a6c36f365ae1dce2005ae313545d45a8e /freebsd/sys/pcpu.h
parentRestructure init and add more detailed initialization. (diff)
downloadrtems-libbsd-325120c8755aa974a03fc85f020857fbec9cc071.tar.bz2
Fix curthread so it returns a valid value.
Diffstat (limited to 'freebsd/sys/pcpu.h')
-rw-r--r--freebsd/sys/pcpu.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/freebsd/sys/pcpu.h b/freebsd/sys/pcpu.h
index 8c93f2a8..ce84f15a 100644
--- a/freebsd/sys/pcpu.h
+++ b/freebsd/sys/pcpu.h
@@ -199,6 +199,11 @@ SLIST_HEAD(cpuhead, pcpu);
extern struct cpuhead cpuhead;
extern struct pcpu *cpuid_to_pcpu[MAXCPU];
+#ifdef __rtems__
+struct thread *rtems_get_curthread(void);
+#define curthread rtems_get_curthread()
+#endif
+
#define curcpu PCPU_GET(cpuid)
#define curproc (curthread->td_proc)
#ifndef curthread