Skip to content

Commit

Permalink
arch: remove instances of fiberRtnValueSet()
Browse files Browse the repository at this point in the history
Obsolete, replaced by _set_thread_return_value().

Change-Id: I23e9cfc07e43542f0965817edc3552d456fd2ef3
Signed-off-by: Benjamin Walsh <[email protected]>
  • Loading branch information
benwrs authored and Anas Nashif committed Dec 21, 2016
1 parent 6209218 commit bfa5653
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
5 changes: 3 additions & 2 deletions arch/arc/core/swap.S
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ GDATA(_kernel)
* When _Swap() is invoked, we know the decision to perform a context switch or
* not has already been taken and a context switch must happen.
*
* @return may contain a return value setup by a call to fiberRtnValueSet()
* @return may contain a return value setup by a call to
* _set_thread_return_value()
*
* C function prototype:
*
Expand All @@ -85,7 +86,7 @@ SECTION_FUNC(TEXT, _Swap)
* Carve space for the return value. Setting it to a defafult of
* -EAGAIN eliminates the need for the timeout code to set it.
* If another value is ever needed, it can be modified with
* fiberRtnValueSet().
* _set_thread_return_value().
*/
ld r3, [_k_neg_eagain]
st_s r3, [r2, _thread_offset_to_return_value]
Expand Down
3 changes: 2 additions & 1 deletion arch/arm/core/swap.S
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,8 @@ _context_switch:
* On Cortex-M0/M0+ the intlock key is represented by the PRIMASK register,
* as BASEPRI is not available.
*
* @return may contain a return value setup by a call to fiberRtnValueSet()
* @return may contain a return value setup by a call to
* _set_thread_return_value()
*
* C function prototype:
*
Expand Down
7 changes: 4 additions & 3 deletions arch/nios2/core/swap.S
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,10 @@ SECTION_FUNC(exception.other, _Swap)
*/
ldw r3, _thread_offset_to_key(r2)

/* Load return value into r2 (return value register). -EAGAIN
* unless someone previously called fiberRtnValueSet(). Do this
* before we potentially unlock interrupts.
/*
* Load return value into r2 (return value register). -EAGAIN unless
* someone previously called _set_thread_return_value(). Do this before
* we potentially unlock interrupts.
*/
ldw r2, _thread_offset_to_retval(r2)

Expand Down
9 changes: 5 additions & 4 deletions arch/x86/core/swap.S
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@
* Floating point registers are currently NOT scrubbed, and are subject to
* potential security leaks.
*
* @return -EAGAIN, or a return value set by a call to fiberRtnValueSet()
* @return -EAGAIN, or a return value set by a call to
* _set_thread_return_value()
*
* C function prototype:
*
Expand Down Expand Up @@ -115,7 +116,7 @@ SECTION_FUNC(TEXT, _Swap)
* Carve space for the return value. Setting it to a defafult of
* -EAGAIN eliminates the need for the timeout code to set it.
* If another value is ever needed, it can be modified with
* fiberRtnValueSet().
* _set_thread_return_value().
*/

pushl _k_neg_eagain
Expand Down Expand Up @@ -302,7 +303,7 @@ CROHandlingDone:
movl _thread_offset_to_esp(%eax), %esp


/* load return value from a possible fiberRtnValueSet() */
/* load return value from a possible _set_thread_return_value() */

popl %eax

Expand All @@ -317,7 +318,7 @@ CROHandlingDone:
* %eax may contain one of these values:
*
* - the return value for _Swap() that was set up by a call to
* fiberRtnValueSet()
* _set_thread_return_value()
* - in legacy kernel, same value as %ebx, which is non-volatile
* - in unified kernel, -EINVAL
*/
Expand Down

0 comments on commit bfa5653

Please sign in to comment.