mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-14 13:56:17 +08:00
Fix curthread so it returns a valid value.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user