mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 09:11:07 -04:00
Implement alpha_pal_wrunique() and alpha_pal_rdunique(). Both are
used to set and get the thread pointer. Note that a context switch will automaticly save and restore the thread pointer.
This commit is contained in:
parent
286cc49014
commit
c8baa23e56
1 changed files with 17 additions and 0 deletions
|
|
@ -458,6 +458,23 @@ alpha_pal_rdval(void)
|
|||
return v0;
|
||||
}
|
||||
|
||||
static __inline void
|
||||
alpha_pal_wrunique(u_int64_t tp)
|
||||
{
|
||||
register u_int64_t a0 __asm__("$16") = tp;
|
||||
__asm__ __volatile__("call_pal 0x9f # PAL_wrunique"
|
||||
: "+r" (a0) : : "$1", "$22", "$23", "$24", "$25");
|
||||
}
|
||||
|
||||
static __inline u_int64_t
|
||||
alpha_pal_rdunique(void)
|
||||
{
|
||||
register u_int64_t v0 __asm__("$0");
|
||||
__asm__ __volatile__("call_pal 0x9e # PAL_rdunique"
|
||||
: "=r" (v0) : : "$1", "$22", "$23", "$24", "$25");
|
||||
return (v0);
|
||||
}
|
||||
|
||||
static __inline void
|
||||
alpha_pal_tbi(u_int64_t op, u_int64_t va)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue