8 lines
162 B
C
8 lines
162 B
C
#include <types.h>
|
|
|
|
/** Returns the current hart id */
|
|
static inline u64 r_mhartid() {
|
|
u64 x;
|
|
asm volatile("csrr %0, mhartid" : "=r"(x));
|
|
return x;
|
|
}
|