1/* 2 Title: rtsentry.h - Entry points to the run-time system 3 4 Copyright (c) 2016 David C. J. Matthews 5 6 This library is free software; you can redistribute it and/or 7 modify it under the terms of the GNU Lesser General Public 8 License version 2.1 as published by the Free Software Foundation. 9 10 This library is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 Lesser General Public License for more details. 14 15 You should have received a copy of the GNU Lesser General Public 16 License along with this library; if not, write to the Free Software 17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 19*/ 20 21#ifndef RTSENTRY_H_INCLUDED 22#define RTSENTRY_H_INCLUDED 23class SaveVecEntry; 24class TaskData; 25class PolyObject; 26 27typedef SaveVecEntry *Handle; 28 29extern Handle creatEntryPointObject(TaskData *taskData, Handle entryH, bool isFuncPtr); 30extern const char *getEntryPointName(PolyObject *p, bool *isFuncPtr); 31extern bool setEntryPoint(PolyObject *p); 32 33typedef void (*polyRTSFunction)(); 34 35typedef struct _entrypts { 36 const char *name; 37 polyRTSFunction entry; 38} *entrypts; 39 40// Ensure that the RTS calls can be found by the linker. 41#ifndef POLYEXTERNALSYMBOL 42#ifdef _MSC_VER 43#define POLYEXTERNALSYMBOL __declspec(dllexport) 44#else 45#define POLYEXTERNALSYMBOL 46#endif 47#endif 48 49#endif 50