Changeset View
Changeset View
Standalone View
Standalone View
sys/riscv/include/ifunc.h
| Show All 24 Lines | |||||
| * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
| * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
| * SUCH DAMAGE. | * SUCH DAMAGE. | ||||
| */ | */ | ||||
| #ifndef __RISCV_IFUNC_H | #ifndef __RISCV_IFUNC_H | ||||
| #define __RISCV_IFUNC_H | #define __RISCV_IFUNC_H | ||||
| #define __DO_NOT_HAVE_SYS_IFUNCS 1 | |||||
imp: Isn't it about time to retire this too? | |||||
mhorneAuthorUnsubmitted Done Inline ActionsThe flag is new. We now have the choice to retain it for some future use or remove it outright. I will post a follow-up tomorrow. mhorne: The flag is new. We now have the choice to retain it for some future use or remove it outright. | |||||
kibUnsubmitted Done Inline ActionsDo you mean, removing its only use from sched_shim.c? kib: Do you mean, removing its only use from sched_shim.c?
I do not object, but do we need to remove… | |||||
jrtc27Unsubmitted Done Inline Actions__DEFINE_SHIM can be simplified to not separate argument types and names (and I think can then be made variadic as there's no clever splicing needed) but still has value in reducing duplication jrtc27: __DEFINE_SHIM can be simplified to not separate argument types and names (and I think can then… | |||||
mhorneAuthorUnsubmitted Done Inline ActionsProposed change in D55114. mhorne: Proposed change in D55114. | |||||
| #define DEFINE_IFUNC(qual, ret_type, name, args) \ | #define DEFINE_IFUNC(qual, ret_type, name, args) \ | ||||
| static ret_type (*name##_resolver(void))args __used; \ | static ret_type (*name##_resolver(void))args __used; \ | ||||
| qual ret_type name args __attribute__((ifunc(#name "_resolver"))); \ | qual ret_type name args __attribute__((ifunc(#name "_resolver"))); \ | ||||
| static ret_type (*name##_resolver(void))args | static ret_type (*name##_resolver(void))args | ||||
| #define DEFINE_UIFUNC(qual, ret_type, name, args) \ | #define DEFINE_UIFUNC(qual, ret_type, name, args) \ | ||||
| static ret_type (*name##_resolver(unsigned long, unsigned long, \ | static ret_type (*name##_resolver(unsigned long, unsigned long, \ | ||||
| unsigned long, unsigned long, unsigned long, unsigned long, \ | unsigned long, unsigned long, unsigned long, unsigned long, \ | ||||
| Show All 9 Lines | |||||
Isn't it about time to retire this too?