suvm_device.h (1495B)
1 /* Copyright (C) 2020-2023 |Méso|Star> (contact@meso-star.com) 2 * 3 * This program is free software: you can redistribute it and/or modify 4 * it under the terms of the GNU General Public License as published by 5 * the Free Software Foundation, either version 3 of the License, or 6 * (at your option) any later version. 7 * 8 * This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU General Public License for more details. 12 * 13 * You should have received a copy of the GNU General Public License 14 * along with this program. If not, see <http://www.gnu.org/licenses/>. */ 15 16 #ifndef SUVM_DEVICE_H 17 #define SUVM_DEVICE_H 18 19 #include "suvm_backend.h" 20 #include <rsys/ref_count.h> 21 22 struct logger; 23 struct mem_allocator; 24 25 struct suvm_device { 26 int verbose; 27 struct logger* logger; 28 struct mem_allocator* allocator; 29 RTCDevice rtc; /* Embree device */ 30 ref_T ref; 31 }; 32 33 extern LOCAL_SYM void 34 log_info 35 (struct suvm_device* dev, 36 const char* msg, 37 ...) 38 #ifdef COMPILER_GCC 39 __attribute((format(printf, 2, 3))) 40 #endif 41 ; 42 43 extern LOCAL_SYM void 44 log_err 45 (struct suvm_device* dev, 46 const char* msg, 47 ...) 48 #ifdef COMPILER_GCC 49 __attribute((format(printf, 2, 3))) 50 #endif 51 ; 52 53 extern LOCAL_SYM void 54 log_warn 55 (struct suvm_device* dev, 56 const char* msg, 57 ...) 58 #ifdef COMPILER_GCC 59 __attribute((format(printf, 2, 3))) 60 #endif 61 ; 62 63 #endif /* SUVM_DEVICE_H */