Skip to content

Commit e608051

Browse files
committed
Clear atomic reservation on context switch
1 parent f686648 commit e608051

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

libogc/lwp_handler.S

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
/*-------------------------------------------------------------
1919
20-
Copyright (C) 2004 - 2025
20+
Copyright (C) 2004 - 2026
2121
Michael Wiedenbauer (shagkur)
2222
Dave Murphy (WinterMute)
2323
Extrems' Corner.org
@@ -322,14 +322,17 @@ _cpu_context_switch:
322322
sync
323323
isync
324324

325+
li r0,GP_1
326+
stwcx. sp,r3,r0
327+
325328
stw sp,GP_1(r3)
326329
lwz sp,GP_1(r4)
327330
stw toc,GP_2(r3)
328331
lwz toc,GP_2(r4)
329332

330-
stmw r13,GP_13(r3)
333+
stmw r13,GP_13(r3)
331334
lmw r13,GP_13(r4)
332-
335+
333336
mfgqr r5,0
334337
stw r5,GQ_0(r3)
335338
lwz r6,GQ_0(r4)

libogc/lwp_threads.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
/*-------------------------------------------------------------
2727
28-
Copyright (C) 2004 - 2025
28+
Copyright (C) 2004 - 2026
2929
Michael Wiedenbauer (shagkur)
3030
Dave Murphy (WinterMute)
3131
Extrems' Corner.org

0 commit comments

Comments
 (0)