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 | |||||
| #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 | |||||