Skip to content

Commit

Permalink
Cleanup of code. Fix issue with port yield calls, make portYIELD_WITH…
Browse files Browse the repository at this point in the history
…IN_API() and portYIELD() different functions.
  • Loading branch information
Skptak committed Mar 20, 2024
1 parent 941f945 commit 3da0bf2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 39 deletions.
12 changes: 0 additions & 12 deletions portable/GCC/ARM_CM23_NTZ/non_secure/mpu_wrappers_v2_asm.S
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,6 @@ vPortYield:
SVC #portSVC_YIELD
BX LR


/*
* void vPortYieldISR( void );
*/
.align 4
.global vPortYieldISR
.type vPortYieldISR, %function
vPortYieldISR:
SVC #portSVC_YIELD
BX LR

/* ----------------------------------------------------------------------------------- */

/*
Expand All @@ -74,5 +63,4 @@ xPortGetIPSR:

/* ----------------------------------------------------------------------------------- */


.end
29 changes: 2 additions & 27 deletions portable/GCC/ARM_CM23_NTZ/non_secure/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,41 +84,16 @@
" isb \n" \
::: "memory" )

/**
* @brief Raise SVC to cause a Pending SVC.
*/
extern void vPortYield( void ) __attribute__( ( naked ) ) /* FREERTOS_SYSTEM_CALL */;

/**
* @brief Raise SVC to cause a Pending SVC.
* @brief Scheduler utilities.
*/
extern void vPortYield( void ) __attribute__( ( naked ) ) /* FREERTOS_SYSTEM_CALL */;
extern void vPortRequestYield( void ) /* PRIVILEGED_FUNCTION */;


#if 0
/**
* @brief Scheduler utilities.
*/
#define portYIELD() vPortYield()
#define portYIELD_WITHIN_API() vPortYield()

#else

/**
* @brief Scheduler utilities.
*/
#define portYIELD() __asm volatile ( " svc %0 " :: "i" ( portSVC_YIELD ) : "memory" )

//extern void vPortRequestYield(void);
//extern void vPortYield( void ) /* PRIVILEGED_FUNCTION */;
//extern void vPortYieldISR( void ) /* PRIVILEGED_FUNCTION */;
//#define portYIELD() vPortYield()
//#define portYIELD_WITHIN_API() portYIELD()
//#define portYIELD() __asm volatile ( "svc %0" ::"i" ( portSVC_YIELD ) : "memory" )
#define portYIELD_WITHIN_API() vPortRequestYield()


#endif
/* ----------------------------------------------------------------------------------- */

/* *INDENT-OFF* */
Expand Down

0 comments on commit 3da0bf2

Please sign in to comment.