mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-04 18:28:30 +00:00
Get deathstar demo working again on metal
This commit is contained in:
parent
15ea0524b3
commit
bd6d9ff99a
6 changed files with 21 additions and 17 deletions
|
@ -34,7 +34,7 @@ int __tailcontext(const ucontext_t *);
|
|||
* @see getcontext()
|
||||
*/
|
||||
int setcontext(const ucontext_t *uc) {
|
||||
if (IsWindows()) {
|
||||
if (IsWindows() || IsMetal()) {
|
||||
atomic_store_explicit(&__get_tls()->tib_sigmask, uc->uc_sigmask,
|
||||
memory_order_release);
|
||||
} else {
|
||||
|
@ -44,7 +44,7 @@ int setcontext(const ucontext_t *uc) {
|
|||
}
|
||||
|
||||
int __getcontextsig(ucontext_t *uc) {
|
||||
if (IsWindows()) {
|
||||
if (IsWindows() || IsMetal()) {
|
||||
uc->uc_sigmask =
|
||||
atomic_load_explicit(&__get_tls()->tib_sigmask, memory_order_acquire);
|
||||
return 0;
|
||||
|
@ -54,7 +54,7 @@ int __getcontextsig(ucontext_t *uc) {
|
|||
}
|
||||
|
||||
int __swapcontextsig(ucontext_t *x, const ucontext_t *y) {
|
||||
if (IsWindows()) {
|
||||
if (IsWindows() || IsMetal()) {
|
||||
x->uc_sigmask = atomic_exchange_explicit(
|
||||
&__get_tls()->tib_sigmask, y->uc_sigmask, memory_order_acquire);
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue