Skip to content

Commit

Permalink
Merge pull request #80 from snaury/sparc-fix-return-0
Browse files Browse the repository at this point in the history
Try to fix return 0 on sparc
  • Loading branch information
snaury committed Apr 28, 2015
2 parents 7ecc2f1 + 34fa4d7 commit 1c1c350
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions platform/switch_sparc_sun_gcc.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
static int
slp_switch(void)
{
register int err;
register int *stackref, stsizediff;

/* Flush SPARC register windows onto the stack, so they can be used to
Expand Down Expand Up @@ -80,8 +81,8 @@ slp_switch(void)
* we can't guarantee the other register windows are fine to use by
* their threads anymore, so tell the CPU to clean them. */
__asm__ volatile ("ta %0" : : "i" (ST_CLEAN_WINDOWS));

return 0;
__asm__ volatile ("mov %1, %0" : "=r" (err) : "i" (0));
return err;
}
}

Expand Down

0 comments on commit 1c1c350

Please sign in to comment.