| 1 | #include "thread/seadThreadUtil.h" |
|---|---|
| 2 | #include "basis/seadRawPrint.h" |
| 3 | |
| 4 | namespace sead |
| 5 | { |
| 6 | s32 ThreadUtil::ConvertPrioritySeadToPlatform(s32 prio) |
| 7 | { |
| 8 | SEAD_ASSERT(prio >= 0); |
| 9 | SEAD_ASSERT(prio < 32); |
| 10 | return prio; |
| 11 | } |
| 12 | |
| 13 | s32 ThreadUtil::ConvertPriorityPlatformToSead(s32 prio) |
| 14 | { |
| 15 | SEAD_ASSERT(prio >= 0); |
| 16 | SEAD_ASSERT(prio < 32); |
| 17 | return prio; |
| 18 | } |
| 19 | |
| 20 | // NON_MATCHING: two instructions are reordered; maybe this is inline assembly? |
| 21 | uintptr_t ThreadUtil::GetCurrentStackPointer() |
| 22 | { |
| 23 | volatile uintptr_t x = 0; |
| 24 | uintptr_t y; |
| 25 | x = uintptr_t(&y); |
| 26 | return x; |
| 27 | } |
| 28 | } // namespace sead |
| 29 |